CN110839053B - Device communication method, device and storage medium - Google Patents

Device communication method, device and storage medium Download PDF

Info

Publication number
CN110839053B
CN110839053B CN201810936586.0A CN201810936586A CN110839053B CN 110839053 B CN110839053 B CN 110839053B CN 201810936586 A CN201810936586 A CN 201810936586A CN 110839053 B CN110839053 B CN 110839053B
Authority
CN
China
Prior art keywords
equipment
identification information
information
broadcast message
category
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
CN201810936586.0A
Other languages
Chinese (zh)
Other versions
CN110839053A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810936586.0A priority Critical patent/CN110839053B/en
Publication of CN110839053A publication Critical patent/CN110839053A/en
Application granted granted Critical
Publication of CN110839053B publication Critical patent/CN110839053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a device communication method, a device, equipment and a storage medium, so as to realize wireless communication between the devices. The method comprises the following steps: determining category information of equipment, and sending an acquisition request according to the category information; receiving identification information fed back according to the acquisition request, wherein the identification information is generated according to a communication protocol of the equipment; and analyzing the broadcast message of the equipment according to the identification information to obtain the identification information of the equipment. The equipment identification and the message analysis are realized, so that the equipment of different protocols can be identified, the equipment of different protocols can be accessed into the platform, and the compatibility of the platform is improved.

Description

Device communication method, device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a device communication method, a device communication apparatus, an electronic device, and a storage medium.
Background
The Internet of Things (IoT) is an Internet connected to objects, and can collect various information such as objects or processes to be monitored, connected and interacted in real time through various information sensing devices, and is combined with the Internet to form a huge network.
With the rise of the internet of things, IoT devices are also diversified more and more, different IoT devices can be connected with each other, and the IoT devices can also be connected with a network server, so that interactive communication is realized, and message transmission, device control and the like are performed. The IoT device may be connected to other devices in a WIreless manner such as WIreless Fidelity (WIFI) or bluetooth.
In the process of connecting in a wireless manner, two devices are required to be capable of identifying each other so as to transmit service data. Different devices may use different protocols to transmit wireless data, so that sometimes a problem occurs that the devices cannot identify and cannot communicate.
Disclosure of Invention
The embodiment of the application provides a device communication method, so as to realize wireless communication between devices.
Correspondingly, the embodiment of the application also provides a device communication device, an electronic device and a storage medium, which are used for ensuring the realization and application of the system.
In order to solve the above problem, an embodiment of the present application discloses an apparatus communication method, where the method includes: determining category information of equipment, and sending an acquisition request according to the category information; receiving identification information fed back according to the acquisition request, wherein the identification information is generated according to a communication protocol of the equipment; and analyzing the broadcast message of the equipment according to the identification information to obtain the identification information of the equipment.
Optionally, the determining the category information of the device includes at least one of the following steps: acquiring address information of equipment, and acquiring category information of the equipment from the address information; acquiring category information of the equipment by scanning the identification code of the equipment; receiving a category instruction in an interface, and determining category information of the equipment according to the category instruction.
Optionally, the analyzing the broadcast message of the device according to the identification information to obtain the identification information of the device includes: determining operation information according to the identification information; and analyzing the broadcast message of the equipment by adopting the operation information to obtain the identification information of the equipment.
Optionally, determining operation information according to the identification information includes: and mapping the identification information into operation information corresponding to the running environment.
Optionally, the method further includes: and carrying out interactive operation with the equipment corresponding to the identification information according to the identification information.
Optionally, the method is applied to an internet of things system, and the broadcast message comprises a bluetooth broadcast message.
The embodiment of the application also discloses a device communication device, which comprises: the determining module is used for determining the category information of the equipment; the sending module is used for sending an acquisition request according to the category information; a receiving module, configured to receive identification information fed back according to the acquisition request, where the identification information is generated according to a communication protocol of the device; and the analysis module is used for analyzing the broadcast message of the equipment according to the identification information to obtain the identification information of the equipment.
Optionally, the determining module is configured to obtain address information of a device, and obtain category information of the device from the address information; and/or, acquiring the category information of the equipment by scanning the identification code of the equipment; and/or receiving a category instruction in an interface, and determining the category information of the equipment according to the category instruction.
Optionally, the parsing module includes: the operation determining submodule is used for determining operation information according to the identification information; and the identification analysis submodule is used for analyzing the broadcast message of the equipment by adopting the operation information to obtain the identification information of the equipment.
Optionally, the operation determining sub-module is configured to map the identification information to operation information corresponding to an operating environment.
Optionally, the method further includes: and the interaction module is used for carrying out interaction operation with the equipment corresponding to the identification information according to the identification information.
Optionally, the method is applied to an internet of things system, and the broadcast message comprises a bluetooth broadcast message.
The embodiment of the application also discloses an electronic device, which comprises: a processor; and a memory having executable code stored thereon, which when executed, causes the processor to perform a device communication method as described in one or more of the embodiments of the present application.
One or more machine-readable media having stored thereon executable code that, when executed, causes a processor to perform a device communication method as described in one or more of the embodiments of the present application are also disclosed.
The embodiment of the application also discloses a device communication method, which comprises the following steps: acquiring identification information of equipment, wherein the identification information is generated according to a communication protocol of the equipment; and analyzing the broadcast message of the equipment according to the identification information to obtain the identification information of the equipment.
The embodiment of the application also discloses a device communication device, which comprises: the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring identification information of equipment, and the identification information is generated according to a communication protocol of the equipment; and the analysis module is used for analyzing the broadcast message of the equipment according to the identification information to obtain the identification information of the equipment.
Compared with the prior art, the embodiment of the application has the following advantages:
in the embodiment of the application, the class information of the equipment can be determined, the acquisition request is sent according to the class information, so that the identification information is acquired, the identification information is generated based on the communication protocol of the equipment, then the broadcast message is analyzed by adopting the identification information, the identification information of the equipment is acquired, the identification of the equipment and the analysis of the message are realized, the equipment with different protocols can be identified, the equipment with different protocols can be accessed to the platform, and the compatibility of the platform is improved.
Drawings
Fig. 1 is a schematic diagram of an IoT system in an embodiment of the present application;
FIG. 2 is a flow chart illustrating steps of an embodiment of a method for device communication according to the present application;
FIG. 3 is a flow chart of steps in another embodiment of a method for communicating by a device of the present application;
FIG. 4 is a flow chart of steps in an alternative embodiment of a method for communicating by a device of the present application;
FIG. 5 is a block diagram of an embodiment of a device communication apparatus according to the present application;
FIG. 6 is a block diagram of another embodiment of a device communication apparatus of the present application;
FIG. 7 is a block diagram of an alternate embodiment of a communication device of the present application;
fig. 8 is a schematic structural diagram of an apparatus according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
The technology of the internet of things can be applied to various devices, and since the IoT devices are various in types and manufacturers are also very many, the IoT devices can be connected and interacted through various protocols. Existing IoT platforms often specify a uniform protocol for communication, thereby facilitating inter-device and device-to-platform communication. This also results in no access for IoT devices that do not support the platform protocol, making the platform less compatible. The embodiment of the application provides an equipment communication method, which can generate identification information based on a communication protocol of IoT equipment, so that a broadcast message is analyzed based on the identification information to obtain identification information of the equipment, the identification of the equipment and the analysis of the message are realized, the IoT equipment with different protocols can be identified, the IoT equipment with different protocols can be accessed to an IoT platform, and the compatibility of the IoT platform is improved.
As shown in fig. 1, the IoT system schematic diagram includes: an IoT platform 10 and an IoT device 20, wherein the IoT platform 10 may comprise a server or the like, and the IoT device 20 comprises a first IoT device 202 and a second IoT device 204. The IoT platform can have a standard communication protocol, IoT devices supporting the communication protocol can directly interact with each other, for the IoT devices not supporting the communication protocol, identification information can be generated according to the communication protocol of the IoT devices, and corresponding identification information is stored on the platform, so that for devices of different protocols, access and communication can be realized according to the identification information. Therefore, when the IoT device accesses the platform, the identification information corresponding to the communication protocol of the IoT device can also be uploaded to the IoT platform, so that the platform can support different protocol devices.
Therefore, when two IoT devices communicate, one IoT device as a slave device sends out a broadcast message, and the other IoT device as a master device may scan and acquire the broadcast message and perform parsing processing, wherein if the master device cannot directly parse the broadcast message of the slave device, the master device may acquire identification information of the slave device from a platform, and then parse the broadcast message according to the identification information, thereby acquiring identification information of the slave device, where the identification information is used to uniquely identify one device, and is data such as a device identification (Identity, ID), and the like, and the devices may be distinguished based on the identification information, so that after receiving the broadcast message of the device, the identification information is invoked to parse and perform a required operation. The devices can be connected based on the identification information, so that when the main device is connected or discovers a plurality of devices, the target device can be determined based on the identification information and interactive communication can be carried out.
The identification information is generated according to a communication protocol of the device, and in one example, the corresponding executable code may be obtained based on the communication protocol of the device, and the identification information is generated based on the executable code, so that the data packet is parsed and the corresponding operation is executed based on the executable code in the identification information. For example, a JS (javascript) script is dynamically abstracted in accordance with the communication protocol of the device, so that the broadcast message of the device can be parsed based on the JS script and the required operation can be performed.
The merchant algorithm is input on the platform side, namely, a developer of the device can input the identification information on the platform, and the programming language of the identification information is not limited, for example, JS and the like are adopted. Wherein the entering of the identification information comprises: the peripheral name (peripheral _ name), the name (localname) inside the peripheral, and the broadcast packet data (advertisement _ data) of the peripheral include production data (creation _ data), and the like, and the return value of the identification information may be a string type (string).
On the device side, an Application program (APP) installed in a gateway or an IoT device may be embedded with an IoT platform standard protocol parsing script, so as to support data of a device using the platform standard protocol, and for a device using a non-standard protocol, identification information generated based on a communication protocol thereof may be prestored or downloaded, and a message of the corresponding device may be parsed according to the parsing script corresponding to the identification information, so as to implement a support service for the device. After the identification information corresponding to the equipment is downloaded to the application program or the gateway, the identification information can be dynamically mapped into the operation of a master (central) and a slave (peripheral) which can be executed by the operating environment, so that the equipment can be subjected to control commands and data uplink and downlink transmission through a visual interface or communication commands. The running environment may be determined according to parameters such as an operating system of the device, for example, the operating system is iOS, Android (Android), or for example, the compiling environment is c + +, and the like, and the operations of the central and peripheral may include: scanning operation, connecting operation, reading operation, writing operation, subscribing operation and the like, and can also discover services and discover characteristics corresponding to the services.
For example, a broadcast message is initiated by the first IoT device 202 as a slave and the second IoT device 204 as a master to scan. The second IoT device 204 may store the identification information of the first IoT device. The identification information may be downloaded in advance, or may be downloaded according to a received broadcast message, which is not limited in this embodiment of the present application. After the second IoT device scans the broadcast message of the first IoT device and acquires the identification information of the first IoT device, the broadcast message may be parsed according to the identification information, so as to obtain the identification information of the first IoT device, and the broadcast message of the second IoT device may be subsequently recognized in the received broadcast message and parsed.
In the embodiment of the present application, generally, a type of IoT devices may employ the same communication protocol, and therefore, the identification information of the type of IoT devices is also the same, and in the IoT platform, the correspondence between the category information and the identification information of the IoT devices may be established, so that the identification information can be queried based on the category information.
The acquiring of the identification information of the device includes: determining category information of equipment, and sending an acquisition request according to the category information; and receiving the identification information fed back according to the acquisition request. The method includes the steps that for an IoT device needing to be connected, class information of the IoT device can be determined, wherein the class information refers to a class to which the IoT device belongs and can be divided according to a model, a manufacturer and the like.
Wherein the determining of the class information of the device comprises at least one of the following steps: acquiring address information of equipment, and acquiring category information of the equipment from the address information; acquiring category information of the equipment by scanning the identification code of the equipment; receiving a category instruction in an interface, and determining category information of the equipment according to the category instruction.
The category information may be obtained through interaction, for example, the category information may be carried in address information of the device, such as a Uniform Resource Locator (URL) address, so as to obtain the address information of the device, and then obtain the category information from the address information. The identification code can also carry category information, for example, the two-dimensional code carries the category information, so that the identification code is pasted on the equipment or displayed on a screen of the equipment, and the main equipment can scan the identification code and then analyze the identification code to obtain the category information. The category information may also be determined by a selection or the like, for example, an interface may be displayed on the host device, a category instruction may be received in the interface, category information of the device may be determined according to the category instruction, for example, a request may be sent to the platform according to the instruction, then the category information of the device may be received, in one example, the interface may include a control, data such as a brand, a model and the like of the device may be selected by sending the category instruction based on the control, the category information may be determined based on the selection, in another example, the interface may include an input box, information such as the model and the like of the device may be input in the input box, then the input may be submitted through the category instruction, and then the category information may be determined according to the data such as the model.
Therefore, according to the category information, the master device can acquire the identification information of the slave device, so that the broadcast message of the slave device is analyzed. The identification information may be obtained before the master device receives the broadcast message of the slave device, or the identification information may be obtained after the master device receives the broadcast message and determines that the identification information cannot be obtained after the master device determines that the identification information cannot be analyzed.
In an optional embodiment, the analyzing the broadcast message of the device according to the identification information to obtain the identification information of the device includes: generating operation information according to the identification information; and analyzing the broadcast message of the equipment by adopting the operation information to obtain the identification information of the equipment. According to the identification information, the corresponding operation information can be dynamically mapped into a master (central) operation and a slave (peripheral) operation which can be executed by the operating environment of the master device, so that after the broadcast message is received, the broadcast message of the device can be analyzed based on the corresponding operation information, for example, the broadcast message is analyzed through a connection operation to obtain the identification information of the device, and then the connection is established with the device.
The subsequent master device may perform an interactive operation with the device corresponding to the identification information based on the identification information, for example, analyze communication data of the slave device using the required operation information, and perform operations such as reading, writing, subscribing, controlling, and the like.
In this embodiment, the broadcast message is a wireless broadcast message, such as a bluetooth broadcast message, so that the IoT device can communicate based on bluetooth.
Referring to fig. 2, a flowchart illustrating steps of an embodiment of a device communication method of the present application is shown.
Step 202, obtaining identification information of a device, wherein the identification information is generated according to a communication protocol of the device.
The device for scanning the broadcast message is taken as a master device, and the device for sending the broadcast message is taken as a slave device, so that the master device can acquire the identification information of the slave device, the identification information is generated according to the communication protocol of the slave device, the operation information required by communication can be mapped in the master device, and the communication of the devices in different IoT systems is facilitated. Wherein the master device includes a gateway and other IoT devices.
The slave device comprises an IoT device, the slave device can generate identification information according to a communication protocol and then store the identification information in the IoT platform, and the device accessing the IoT platform can acquire the identification information of the slave device so as to perform interactive communication with the device.
And 204, analyzing the broadcast message of the equipment according to the identification information to obtain the identification information of the equipment.
After the identification information of the slave device is obtained, for the broadcast message received by the master device, the identification information can be used to analyze the broadcast message to obtain the identification information carried in the broadcast message, so as to obtain the unique identification of the device. Thus, after the main device scans or connects a plurality of devices, the target device can be identified based on the identification information, and the required interactive operation can be executed.
In summary, identification information is generated based on a communication protocol of the device, and then the identification information is used to analyze the broadcast message to obtain identification information of the device, so as to identify the device and analyze the message, so that the devices of different protocols can be identified, and thus the devices of different protocols can be accessed to the platform, and the compatibility of the platform is improved.
Referring to fig. 3, a flow chart of steps of another embodiment of a device communication method of the present application is shown.
Step 302, determining the category information of the device, and sending an acquisition request according to the category information.
Step 304, receiving the identification information fed back according to the acquisition request.
The device for scanning the broadcast message is used as a master device, and the device for sending the broadcast message is used as a slave device, so that if the master device cannot analyze the broadcast message and can request identification information from the platform, the class information of the slave device can be acquired, and then the acquisition request is sent according to the type information, so that the platform acquires the corresponding identification information. The category information refers to a category to which the slave device belongs, and may be determined according to a model, a manufacturer, and the like.
The master device comprises a gateway and other IoT devices, the slave device comprises an IoT device, the slave device can generate identification information according to a communication protocol and then store the identification information in the IoT platform, and the device accessing the IoT platform can acquire the identification information of the slave device so as to perform interactive communication with the device.
Step 306, analyzing the broadcast message of the device according to the identification information to obtain the identification information of the device.
After the identification information of the slave device is obtained, for the broadcast message received by the master device, the identification information can be used to analyze the broadcast message to obtain the identification information carried in the broadcast message, so as to obtain the unique identification of the device. Thus, after the main device scans or connects a plurality of devices, the target device can be identified based on the identification information, and the required interactive operation can be executed.
In summary, the category information of the device can be determined, and the acquisition request is sent according to the category information, so as to acquire the identification information, which is generated based on the communication protocol of the device, and then the identification information is adopted to analyze the broadcast message, so as to obtain the identification information of the device, thereby realizing the identification of the device and the analysis of the message, enabling the devices of different protocols to be identified, so that the devices of different protocols can be accessed to the platform, and improving the compatibility of the platform.
Referring to fig. 4, a flow chart of steps of an alternative embodiment of a method for device communication of the present application is shown.
At step 402, a broadcast message for a device is received.
In this embodiment, the broadcast message is received first, and then the identification message is acquired. The slave device sends out the broadcast message, the master device can scan and acquire the broadcast message and analyze and process the broadcast message, and if the master device cannot directly analyze the broadcast message of the slave device, the master device can acquire the identification information corresponding to the request of the platform.
Step 404, determining the category information of the device, and sending an acquisition request according to the category information.
For an IoT device that needs to be connected, class information of the IoT device may be determined, where the class information refers to a class to which the IoT device belongs, and may be determined according to a model, a manufacturer, and the like.
The determining of the class information of the device comprises at least one of the following steps: acquiring address information of equipment, and acquiring category information of the equipment from the address information; acquiring category information of the equipment by scanning the identification code of the equipment; receiving a category instruction in an interface, and determining category information of the equipment according to the category instruction. For example, the category information may be obtained based on address information of the device, and for example, the category information may be obtained by analyzing an identification code such as a two-dimensional code of the scanning device, so as to obtain the category information of the device determined based on the instruction.
Step 406, receiving the identification information fed back according to the acquisition request.
After the category information of the IoT device is obtained, an obtaining request may be generated according to the category information, and then the obtaining request is sent to the IoT platform, and after the server of the IoT platform receives the obtaining request and obtains the category information, corresponding identification information may be obtained according to the category information, and then the identification information is returned to the requesting IoT device.
Step 408, determining operation information according to the identification information.
And determining corresponding operation information according to the operation of a master (central) and a slave (peripheral) which can be executed by the running environment of the master device and can be dynamically mapped by the identification information.
And step 410, analyzing the broadcast message of the device by using the operation information to obtain the identification information of the device.
Analyzing the broadcast message of the device based on the corresponding operation information, for example, analyzing the broadcast message through a connection operation to obtain the identification information of the device, and then establishing a connection with the target device corresponding to the identification information.
And step 412, performing interactive operation with the device corresponding to the identification information according to the identification information.
The master device may perform an interactive operation with the device corresponding to the identification information based on the identification information, for example, analyze communication data of the slave device using the required operation information, and perform operations such as reading, writing, subscribing, controlling, and the like.
The embodiment of the Application can be applied to various operating systems, such as an intelligent operating system of a mobile terminal, and can be applied to various Programming languages, such as objective C, swift, java, and the like, and can be run on various devices using an Application Programming Interface (API) of system bluetooth as a central mode.
Compared with the exclusivity of the existing platform to the protocol used by the equipment, the method and the device for accessing the protocol of the equipment have the advantages that the method and the device for accessing the protocol of the equipment have high latitude, so that stock equipment produced on the market can be accessed, equipment of other protocols which may appear in the future can be accessed conveniently, the platform has high expandability, multiple equipment types can be supported, the latitude of identification information of the equipment can be improved, the method and the device for accessing the protocol can be used for various identification information, the compatibility level of an IoT platform is improved, and the processing efficiency of the equipment is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
On the basis of the above embodiments, the present embodiment further provides a device communication apparatus, which is applied to a gateway, an IoT device, and the like.
Referring to fig. 5, a block diagram of a structure of an embodiment of a device communication apparatus according to the present application is shown, which may specifically include the following modules:
an obtaining module 502 is configured to obtain identification information of a device, where the identification information is generated according to a communication protocol of the device.
The parsing module 504 is configured to parse the broadcast message of the device according to the identification information, so as to obtain the identification information of the device.
In summary, the identification information is generated based on the communication protocol of the device, and then the broadcast message is analyzed by using the identification information to obtain the identification information of the device, so that the device identification and the message analysis are realized, and the devices of different protocols can be identified, so that the devices of different protocols can be accessed to the platform, and the compatibility of the platform is improved.
On the basis of the above embodiments, the present embodiment further provides a device communication apparatus, which is applied to a gateway, an IoT device, and the like.
Referring to fig. 6, a block diagram of a structure of another embodiment of a device communication apparatus according to the present application is shown, which may specifically include the following modules:
a determining module 602, configured to determine class information of a device.
A sending module 604, configured to send an obtaining request according to the category information.
A receiving module 606, configured to receive identification information fed back according to the acquisition request, where the identification information is generated according to a communication protocol of the device.
The parsing module 608 is configured to parse the broadcast message of the device according to the identification information, so as to obtain the identification information of the device.
In summary, the category information of the device can be determined, and the acquisition request is sent according to the category information, so as to acquire the identification information, which is generated based on the communication protocol of the device, and then the identification information is adopted to analyze the broadcast message, so as to obtain the identification information of the device, thereby realizing the identification of the device and the analysis of the message, enabling the devices of different protocols to be identified, so that the devices of different protocols can be accessed to the platform, and improving the compatibility of the platform.
Referring to fig. 7, a block diagram of another alternative embodiment of the communication apparatus of the present application is shown, which may specifically include the following modules:
a determining module 602, configured to determine class information of a device.
A sending module 604, configured to send an obtaining request according to the category information.
A receiving module 606, configured to receive identification information fed back according to the acquisition request, where the identification information is generated according to a communication protocol of the device.
The parsing module 608 is configured to parse the broadcast message of the device according to the identification information, so as to obtain the identification information of the device.
And the interaction module 610 is configured to perform an interaction operation with the device corresponding to the identification information according to the identification information.
The determining module 602 is configured to obtain address information of a device, and obtain category information of the device from the address information; and/or, acquiring the category information of the equipment by scanning the identification code of the equipment; and/or receiving a category instruction in an interface, and determining the category information of the equipment according to the category instruction.
The parsing module 608 includes: an operation determination sub-module 6082 and an identification resolution sub-module 6084, wherein:
an operation determining sub-module 6082, configured to determine operation information according to the identification information.
And an identifier analyzing submodule 6084, configured to analyze the broadcast message of the device using the operation information, to obtain identifier information of the device.
The operation determining sub-module 6082 is configured to map the identification information to operation information corresponding to the operating environment.
The embodiment of the application is applied to the Internet of things system, and the broadcast messages comprise Bluetooth broadcast messages.
The embodiment of the Application can be applied to various operating systems, such as an intelligent operating system of a mobile terminal, and can be applied to various Programming languages, such as objective C, swift, java, and the like, and can be run on various mobile system bluetooth Application Programming Interfaces (APIs) as devices in a central mode.
Compared with the exclusivity of the existing platform to the protocol used by the equipment, the protocol of the equipment has high latitude, so that the equipment can be accessed to stock equipment produced on the market, and equipment of other protocols which may appear in the future can be conveniently accessed.
The embodiments of the present application also provide a non-volatile readable storage medium, where one or more modules (programs) are stored in the storage medium, and when the one or more modules are applied to a device, the one or more modules may cause the device to execute instructions (instructions) of method steps in the embodiments of the present application.
Embodiments of the present application provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause an electronic device to perform a method as described in one or more of the above embodiments. In the embodiment of the present application, the electronic device includes a server, a gateway, an IoT device, and the like.
Embodiments of the present disclosure may be implemented as an apparatus, which may include electronic devices such as servers (clusters), gateways, IoT devices, etc., using any suitable hardware, firmware, software, or any combination thereof, for a desired configuration. Fig. 8 schematically illustrates an example apparatus 800 that may be used to implement various embodiments described in the present application.
For one embodiment, fig. 8 illustrates an example apparatus 800 having one or more processors 802, a control module (chipset) 804 coupled to at least one of the processor(s) 802, a memory 806 coupled to the control module 804, a non-volatile memory (NVM)/storage 808 coupled to the control module 804, one or more input/output devices 810 coupled to the control module 804, and a network interface 812 coupled to the control module 806.
The processor 802 may include one or more single-core or multi-core processors, and the processor 802 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 800 is capable of acting as a master, a slave, an IoT device, and the like as described in embodiments herein.
In some embodiments, the apparatus 800 may include one or more computer-readable media (e.g., the memory 806 or the NVM/storage 808) having instructions 814 and one or more processors 802 that, in conjunction with the one or more computer-readable media, are configured to execute the instructions 814 to implement modules to perform the actions described in this disclosure.
For one embodiment, the control module 804 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 802 and/or any suitable device or component in communication with the control module 804.
The control module 804 may include a memory controller module to provide an interface to the memory 806. The memory controller module may be a hardware module, a software module, and/or a firmware module.
The memory 806 may be used, for example, to load and store data and/or instructions 814 for the apparatus 800. For one embodiment, memory 806 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, the memory 806 may comprise a double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
For one embodiment, the control module 804 may include one or more input/output controllers to provide an interface to the NVM/storage 808 and input/output device(s) 810.
For example, the NVM/storage 808 may be used to store data and/or instructions 814. NVM/storage 808 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more Digital Versatile Disc (DVD) drives).
The NVM/storage 808 may include storage resources that are physically part of the device on which the apparatus 800 is installed, or it may be accessible by the device and may not be necessary as part of the device. For example, the NVM/storage 808 may be accessible over a network via the input/output device(s) 810.
Input/output device(s) 810 may provide an interface for apparatus 800 to communicate with any other suitable device, input/output device(s) 810 may include communication components, audio components, sensor components, and so forth. The network interface 812 may provide an interface for the device 800 to communicate over one or more networks, and the device 800 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, such as access to a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, etc., or a combination thereof.
For one embodiment, at least one of the processor(s) 802 may be packaged together with logic for one or more controller(s) (e.g., memory controller module) of the control module 804. For one embodiment, at least one of the processor(s) 802 may be packaged together with logic for one or more controller(s) of the control module 804 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 802 may be integrated on the same die with logic for one or more controller(s) of the control module 804. For one embodiment, at least one of the processor(s) 802 may be integrated on the same die with logic of one or more controllers of the control module 804 to form a system on a chip (SoC).
In various embodiments, the apparatus 800 may be, but is not limited to being: a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.), among other terminal devices. In various embodiments, the apparatus 800 may have more or fewer components and/or different architectures. For example, in some embodiments, device 800 includes one or more cameras, a keyboard, a Liquid Crystal Display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an Application Specific Integrated Circuit (ASIC), and speakers.
An embodiment of the present application provides an electronic device, including: one or more processors; and one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform a device communication method as described in one or more of the embodiments of the present application.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description is provided for a device communication method, a device communication apparatus, an electronic device and a storage medium, and specific examples are applied herein to explain the principles and embodiments of the present application, and the descriptions of the above embodiments are only used to help understand the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (14)

1. A method for communicating with a device, the method comprising:
determining the category information of the equipment under the condition that the broadcast message of the equipment cannot be analyzed, and sending an acquisition request according to the category information;
receiving identification information fed back according to the acquisition request, wherein the identification information comprises an analysis script generated according to a communication protocol of the equipment;
analyzing the broadcast message of the equipment according to the analysis script to obtain the identification information of the equipment and establish connection with the equipment;
according to the analysis script, performing interactive operation with the equipment corresponding to the identification information, wherein the interactive operation comprises at least one of the following operations: read operation, write operation, subscribe operation.
2. The method of claim 1, wherein the determining the class information of the device comprises at least one of:
acquiring address information of equipment, and acquiring category information of the equipment from the address information;
acquiring category information of the equipment by scanning the identification code of the equipment;
receiving a category instruction in an interface, and determining category information of the equipment according to the category instruction.
3. The method of claim 1, wherein parsing the broadcast message of the device according to the parsing script to obtain the identification information of the device comprises:
determining operation information according to the analysis script;
and analyzing the broadcast message of the equipment by adopting the operation information to obtain the identification information of the equipment.
4. The method of claim 3, wherein determining operational information from the parsing script comprises:
and mapping the analysis script into operation information corresponding to the running environment.
5. The method of any one of claims 1-4, applied to an internet of things system, wherein the broadcast message comprises a Bluetooth broadcast message.
6. An apparatus for communicating with a device, the apparatus comprising:
the determining module is used for determining the category information of the equipment under the condition that the broadcast message of the equipment cannot be analyzed;
the sending module is used for sending an acquisition request according to the category information;
a receiving module, configured to receive identification information fed back according to the acquisition request, where the identification information includes an analysis script generated according to a communication protocol of the device;
the analysis module is used for analyzing the broadcast message of the equipment according to the analysis script to obtain the identification information of the equipment and establishing connection with the equipment;
an interaction module, configured to perform, according to the parsing script, an interaction operation with a device corresponding to the identification information, where the interaction operation includes at least one of the following: read operation, write operation, subscribe operation.
7. The apparatus of claim 6,
the determining module is used for acquiring address information of equipment and acquiring category information of the equipment from the address information; and/or, acquiring the category information of the equipment by scanning the identification code of the equipment; and/or receiving a category instruction in an interface, and determining the category information of the equipment according to the category instruction.
8. The apparatus of claim 6, wherein the parsing module comprises:
the operation determining submodule is used for determining operation information according to the analysis script;
and the identification analysis submodule is used for analyzing the broadcast message of the equipment by adopting the operation information to obtain the identification information of the equipment.
9. The apparatus of claim 8,
and the operation determination submodule is used for mapping the analysis script into operation information corresponding to the running environment.
10. The apparatus according to any one of claims 6-9, wherein the broadcast message comprises a bluetooth broadcast message.
11. An electronic device, comprising:
a processor; and
memory having stored thereon executable code which, when executed, causes the processor to perform a device communication method as claimed in one or more of claims 1-5.
12. One or more machine-readable media having executable code stored thereon that, when executed, causes a processor to perform a device communication method as recited in one or more of claims 1-5.
13. A method for communicating with a device, the method comprising:
acquiring identification information of equipment, wherein the identification information comprises an analysis script generated according to a communication protocol of the equipment;
analyzing the broadcast message of the equipment according to the analysis script to obtain the identification information of the equipment and establish connection with the equipment;
according to the analysis script, performing interactive operation with the equipment corresponding to the identification information, wherein the interactive operation comprises at least one of the following operations: read operation, write operation, subscribe operation.
14. An apparatus for communicating with a device, the apparatus comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring identification information of the device, and the identification information comprises an analysis script generated according to a communication protocol of the device;
the analysis module is used for analyzing the broadcast message of the equipment according to the identification information to obtain the identification information of the equipment and establishing connection with the equipment; according to the analysis script, performing interactive operation with the equipment corresponding to the identification information, wherein the interactive operation comprises at least one of the following operations: read operation, write operation, subscribe operation.
CN201810936586.0A 2018-08-16 2018-08-16 Device communication method, device and storage medium Active CN110839053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810936586.0A CN110839053B (en) 2018-08-16 2018-08-16 Device communication method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810936586.0A CN110839053B (en) 2018-08-16 2018-08-16 Device communication method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110839053A CN110839053A (en) 2020-02-25
CN110839053B true CN110839053B (en) 2022-05-27

Family

ID=69574264

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810936586.0A Active CN110839053B (en) 2018-08-16 2018-08-16 Device communication method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110839053B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760345B (en) * 2022-04-22 2023-10-13 北京和利时智能技术有限公司 Network connection control method and device for multi-source heterogeneous data

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3337206A1 (en) * 2015-08-14 2018-06-20 ZTE Corporation Euicc and activation method thereof, internet of things system, remote subscription management platform

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571732B (en) * 2010-12-30 2015-11-25 中国移动通信集团公司 A kind of methods, devices and systems of processes sensor protocol information
CN104967595B (en) * 2014-10-31 2019-03-01 腾讯科技(深圳)有限公司 The method and apparatus that equipment is registered in platform of internet of things
CN104378236A (en) * 2014-11-24 2015-02-25 青岛海尔软件有限公司 Internet of things device management platform and method
US10230681B2 (en) * 2015-12-14 2019-03-12 International Business Machines Corporation Method and apparatus for unified message adaptation
CN106878926B (en) * 2017-02-08 2020-11-06 泰凌微电子(上海)有限公司 Data transmission method based on low-power-consumption Bluetooth, slave master device and system
CN107231275B (en) * 2017-05-31 2021-07-30 普天智能照明研究院有限公司 Method for connection configuration of user equipment and household equipment
CN107708099B (en) * 2017-11-03 2020-04-10 北京地平线机器人技术研发有限公司 Bluetooth device sharing request and control method and device, and readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3337206A1 (en) * 2015-08-14 2018-06-20 ZTE Corporation Euicc and activation method thereof, internet of things system, remote subscription management platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于物联网的嵌入式智能网关的研究与实现;尹彦霖;《中国优秀硕士学位论文全文数据库 信息科技辑》;20140315;全文 *

Also Published As

Publication number Publication date
CN110839053A (en) 2020-02-25

Similar Documents

Publication Publication Date Title
WO2018223717A1 (en) Webpage front-end testing method, device, system, apparatus and readable storage medium
CN107390994B (en) Interface presentation method and device
WO2019037660A1 (en) Device control method, device, terminal device and operating system
CN105335132B (en) Method, device and system for customizing application program function
CN112579118B (en) Method, device, system, medium and equipment for updating configuration information of micro-service
CN104756080A (en) Augmenting capabilities of a host device
WO2017071120A1 (en) Method and device for establishing wireless connection
US10372119B2 (en) Method for remote monitoring, and system for signal capturing and remote monitoring
EP3087502A1 (en) Transmitting and displaying screen content
US20150381704A1 (en) Mechanism for file transformation and sharing across devices using camera interface
CN104967646B (en) Document down loading method and device
CN111427650A (en) Method and equipment for providing presence information
CN110519250A (en) It is a kind of that the method and apparatus of information flow is provided
CN112579948A (en) Webpage screenshot method and device, storage medium and electronic equipment
CN112328413A (en) Application service calling method, device and system
CN110839053B (en) Device communication method, device and storage medium
CN112346761B (en) Front-end resource online method, device, system and storage medium
CN108268369B (en) Test data acquisition method and device
CN111061977A (en) Website updating method, device and system
CN110442806B (en) Method and apparatus for recognizing image
CN111177062B (en) Method and device for providing reading presentation information
CN114143332B (en) Processing method, electronic equipment and medium based on content delivery network CDN
CN115309657A (en) Method, device, medium and program product for providing test case
CN109471574B (en) Method and device for configuring resources
CN114385128A (en) Data processing method, device, apparatus, storage medium and program product

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024333

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant