Method and apparatus for data interaction

The method and apparatus facilitate data interaction between Bluetooth devices and IoT platforms by using an H5 module and configuration parameters to establish connections and analyze data, addressing the challenge of supporting multiple protocols in Bluetooth devices.

JP7725620B2Active Publication Date: 2025-08-19JINGDONG TECH HLDG CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2023575941
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-06-23
Filing Date
2022-04-13
Publication Date
2025-08-19
Estimated Expiration
2042-04-13

AI Technical Summary

Technical Problem

Bluetooth devices manufactured by different vendors often have customized application protocols that cannot be simultaneously supported by IoT platforms due to resource limitations, leading to either abandonment of the vendor's protocol or the need to support multiple protocols, which complicates data interaction.

Method used

A method and apparatus for data interaction that extracts a device identifier from a broadcast packet, determines the presence of a pre-configured application protocol, and establishes a Bluetooth transmission connection using an H5 module and configuration parameters, allowing data analysis and transmission to an IoT platform without requiring the device to support the IoT platform's protocol.

Benefits of technology

Enables efficient and convenient data interaction between Bluetooth devices and IoT platforms by allowing Bluetooth devices to connect and transmit data without needing to support the IoT platform's application protocol, improving connection efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007725620000001
    Figure 0007725620000001
  • Figure 0007725620000002
    Figure 0007725620000002
  • Figure 0007725620000003
    Figure 0007725620000003
Patent Text Reader

Abstract

The embodiment of the present disclosure discloses a method and apparatus for data interaction. A specific embodiment of the method includes: according to a broadcast packet sent by a target Bluetooth device, extracting a target device identifier of the target Bluetooth device from the broadcast packet; according to determining that the target device identifier exists in the device list, determining whether a pre-configured application protocol exists in the target Bluetooth device; according to determining that a pre-configured application protocol exists in the target Bluetooth device, establishing a Bluetooth transmission connection based on the application protocol; according to the device identifier, obtaining an H5 module and configuration parameters corresponding to the target Bluetooth device; according to the configuration parameters, receiving data to be analyzed sent by the Bluetooth device and transparently transmitting the data to be analyzed to the H5 module; analyzing the data to be analyzed using an analysis algorithm to obtain analyzed data; and according to an interface specification of the Internet of Things (IoT) platform, sending the analyzed data to an IoT platform by the H5 module.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This disclosure claims priority to a Chinese patent application filed on June 23, 2021, bearing application number 202110697338.7 and entitled "Method and Apparatus for Data Interaction," the entire text of which is incorporated herein by reference.

[0002] FIELD OF THE DISCLOSURE Embodiments of the present disclosure relate to the field of computer technology, specifically to the field of Internet of Things (IoT), and in particular to methods and apparatus for data interaction. [Background technology]

[0003] As an important technology direction of IoT, Bluetooth transmission is widely applied in fields such as wearable devices, health devices, smart homes, etc. The IoT platform provides a connection interface for Bluetooth devices and provides a series of application protocols for the IoT platform to support the access of Bluetooth devices. Summary of the Invention [Means for solving the problem]

[0004] SUMMARY OF THE INVENTION Embodiments of the present disclosure provide methods and apparatus for data interaction.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for data interaction, comprising: in response to a broadcast packet transmitted by a target Bluetooth® device, extracting a target device identifier of the target Bluetooth® device from the broadcast packet; searching for the target device identifier in a pre-configured device list including device identifiers of connectable Bluetooth® devices; in response to determining that the target device identifier exists in the device list, determining whether a pre-configured application protocol exists in the target Bluetooth® device; in response to determining that the pre-configured application protocol exists in the target Bluetooth® device, establishing a Bluetooth® transmission connection based on the application protocol; and, based on the target device identifier, obtaining an H5 module and configuration parameters corresponding to the target Bluetooth® device, wherein the H5 module includes an interface specification of an IoT platform. a configuration parameter representing a parameter of an application protocol preset by the vendor; receiving data to be analyzed sent by a target Bluetooth device based on the configuration parameter, and transparently transmitting the data to be analyzed to an H5 module; analyzing the data to be analyzed using the analysis algorithm to obtain analyzed data; and transmitting the analyzed data to an IoT platform based on an interface specification of the IoT platform.

[0006] In some embodiments, the method further includes, in response to determining that the target Bluetooth® device does not have a pre-configured application protocol, obtaining an application protocol of the IoT platform; and sending the application protocol of the IoT platform to the target Bluetooth® device and establishing a Bluetooth® transmission connection based on the application protocol of the IoT platform.

[0007] In some embodiments, the H5 module and configuration parameters are obtained by: sending the target device identifier to a server of the IoT platform, thereby instructing the server to identify the H5 module and configuration parameters corresponding to the target device identifier based on a pre-set correspondence between the device identifier and the H5 module and configuration parameters; and receiving the H5 module and configuration parameters sent by the server.

[0008] In some embodiments, the H5 module further includes an interface specification of a vendor server, and a data processing algorithm is pre-configured in the vendor server, and the method further includes the steps of: sending the parsed data to the vendor server based on the interface specification of the vendor server, thereby instructing the vendor server to invoke the data processing algorithm to process the parsed data; receiving the processed data sent by the vendor server; and sending the processed data to the IoT platform.

[0009] In some embodiments, the configuration parameters include a device access mode, and the method further includes, in response to determining that the device access mode is a connection-oriented access mode, receiving broadcast data sent by the IoT platform and transparently transmitting the broadcast data to the target Bluetooth® device, by the H5 module.

[0010] In a second aspect, an embodiment of the present disclosure provides an apparatus for data interaction, comprising: a device discovery unit configured to, in response to a broadcast packet sent by a target Bluetooth device, extract a target device identifier of the target Bluetooth device from the broadcast packet; a list search unit configured to search for the target device identifier in a pre-defined device list including device identifiers of connectable Bluetooth devices; a protocol detection unit configured, in response to determining that the target device identifier exists in the device list, to determine whether a pre-defined application protocol exists in the target Bluetooth device; and a connection establishment unit configured, in response to determining that the pre-defined application protocol exists in the target Bluetooth device, to establish a Bluetooth transmission connection based on the application protocol. Provided is an apparatus for data interaction, including: an information acquiring unit configured to acquire an H5 module and configuration parameters corresponding to a target Bluetooth® device based on a target device identifier, wherein the H5 module is pre-configured with an interface specification of an Internet of Things (IoT) platform and an analysis algorithm pre-configured by a vendor, and the configuration parameters represent parameters of an application protocol pre-configured by the vendor; a data transparent transmission unit configured to receive data to be analyzed sent by the target Bluetooth® device based on the configuration parameters, and transparently transmit the data to be analyzed to the H5 module; and a data interaction unit configured to perform, via the H5 module, analyzing the data to be analyzed using the analysis algorithm to obtain analyzed data, and transmitting the analyzed data to an IoT platform based on the interface specification of the IoT platform.

[0011] In some embodiments, the connection establishment unit further includes: a protocol acquisition module configured to acquire an application protocol of the IoT platform in response to determining that a pre-configured application protocol does not exist in the target Bluetooth device; and a protocol transmission module configured to send the application protocol of the IoT platform to the target Bluetooth device and establish a Bluetooth transmission connection based on the application protocol of the IoT platform.

[0012] In some embodiments, the information acquiring unit further includes: a device identifier sending module configured to send the target device identifier to a server of the IoT platform and instruct the server to identify the H5 module and configuration parameters corresponding to the target device identifier based on a preset correspondence between the device identifier and the H5 module and configuration parameters; and an information receiving module configured to receive the H5 module and configuration parameters sent by the server.

[0013] In some embodiments, the H5 module further includes an interface specification of a vendor server, and a data processing algorithm is pre-configured in the vendor server; and the data interaction unit is further configured, by the H5 module, to perform the following based on the interface specification of the vendor server: send the parsed data to the vendor server, thereby instructing the vendor server to invoke the data processing algorithm to process the parsed data; receive the processed data sent by the vendor server; and send the processed data to the IoT platform.

[0014] In some embodiments, the configuration parameters include a device access mode, and the data interaction unit is further configured to, in response to determining that the device access mode is a connection-oriented access mode, receive distribution data sent by the IoT platform and transparently transmit the distribution data to the target Bluetooth® device by the H5 module.

[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device comprising one or more processors and a storage device having one or more programs stored therein, the one or more programs, when executed by the one or more processors, causing the one or more processors to implement a method for data interaction as set forth in any of the preceding embodiments.

[0016] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable medium having stored thereon a computer program which, when executed by a processor, causes the method for data interaction according to any of the preceding embodiments to be implemented.

[0017] Other features, objects and advantages of the present disclosure will become more apparent from a reading of the following detailed description of non-limiting embodiments, taken in conjunction with the drawings in which: [Brief explanation of the drawings]

[0018] [Figure 1] FIG. 1 illustrates an exemplary system architecture to which some embodiments of the present disclosure may be applied. [Figure 2] 1 is a flow chart illustrating one embodiment of a method for data interaction according to the present disclosure. [Figure 3] 1 is a schematic diagram illustrating a scene of an embodiment of a method for data interaction according to the present disclosure; [Figure 4] FIG. 2 illustrates a signaling diagram of one embodiment of a method for data interaction according to the present disclosure. [Figure 5] 1 is a structural schematic diagram illustrating one embodiment of an apparatus for data interaction according to the present disclosure; [Figure 6] 1 is a structural schematic diagram of an electronic device suitable for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0019] The present disclosure will be described in more detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of illustrating the related invention, and are not intended to limit the invention. For the sake of convenience, only parts relevant to the invention are shown in the drawings.

[0020] It should be noted that the embodiments and features of the embodiments of the present disclosure can be combined with each other as long as no contradiction occurs. Hereinafter, the present disclosure will be described in detail with reference to the drawings and embodiments.

[0021] In the prior art, Bluetooth® device vendors often pre-configure customized application protocols in the Bluetooth® devices they manufacture. When such Bluetooth® devices access IoT platforms provided by other service providers, they cannot simultaneously support the vendor's customized application protocol and the application protocol provided by the IoT platform due to limitations on the Bluetooth® device's resources, broadcast packets, and power consumption. As a result, the Bluetooth® device must either abandon the vendor's customized application protocol or simultaneously support two application protocols.

[0022] The method and apparatus for data interaction provided by the embodiments of the present disclosure include: when a Bluetooth device sends a broadcast packet, extracting a device identifier of the Bluetooth device from the broadcast packet, and determining whether the Bluetooth device meets a connection condition based on the device identifier; when determining that the Bluetooth device meets the connection condition, obtaining an H5 module and configuration parameters corresponding to the Bluetooth device; if a pre-configured application protocol exists in the Bluetooth device, establishing a Bluetooth transmission connection based on the pre-configured application protocol in the Bluetooth device; receiving data to be analyzed sent by the Bluetooth device; transparently transmitting the data to be analyzed to an H5 module pre-implemented by the vendor; analyzing the data to be analyzed through the H5 module; and transmitting the analyzed data to an IoT platform. The connection between the Bluetooth® device and the IoT platform can be realized without requiring the Bluetooth® device to support the application protocol provided by the IoT platform, thereby realizing data interaction between the Bluetooth® device and the IoT platform and improving the efficiency and convenience of the connection between the Bluetooth® device and the IoT platform.

[0023] FIG. 1 illustrates an exemplary system architecture 100 to which a method for data interaction or an apparatus for data interaction according to embodiments of the present disclosure may be applied.

[0024] 1, the system architecture 100 may include Bluetooth® devices 101, 102, and 103, a terminal device 104, a network 105, and a server 105. The Bluetooth® devices 101, 102, and 103 and the terminal device 104 are all provided with Bluetooth® communication modules, and the Bluetooth® devices 101, 102, and 103 and the terminal device 104 can be connected via Bluetooth®. For example, the Bluetooth® devices 101, 102, and 103 may send broadcast packets and data to be analyzed to the terminal device 104, and the terminal device 104 may analyze the data to be analyzed and obtain analyzed data.

[0025] The network 104 is used as a medium for providing a communications link between the terminal device 104 and the server 105. The network 104 may include various types of connections, such as wire, wireless communication links, or fiber optic cables. 0 4 communicates with the server 106 via a network 105 to transmit the analyzed data to the server 106 .

[0026] The Bluetooth® devices 101, 102, 103 may be electronic devices with Bluetooth® communication capabilities, including, but not limited to, wearable devices such as a smart bracelet 101, a headset 102, and health check devices such as a weighing scale 103.

[0027] The server 106 may be a server of an IoT platform that enables Bluetooth® devices of different vendors to access the server to acquire data from the Bluetooth® devices and provides services to users based on the acquired data. The server may be hardware or software. If the server is hardware, it may be implemented as a distributed server cluster consisting of multiple servers or as a single server. If the server is software, it may be implemented as, for example, multiple software programs or software modules for providing distributed services, or as a single software program or software module.

[0028] It should be noted that the method for data interaction according to the embodiment of the present disclosure may be performed by the terminal device 104, and accordingly, the device for data interaction may be installed in the terminal device 104.

[0029] Reference is now made to Figure 2, which illustrates a flow 200 of one embodiment of a method for data interaction according to the present disclosure. The method for data interaction includes the following steps:

[0030] In step 201, in response to a broadcast packet sent by a Bluetooth device, extract a device identifier of the Bluetooth device from the broadcast packet.

[0031] Generally, a Bluetooth® device uses a built-in Bluetooth® module to send broadcast packets to the outside world. The broadcast packets include a device identifier to represent the identity of the Bluetooth® device, such as a device name, a device ID (identity document), or a universally unique identifier (UUID). When other devices receive the broadcast packets, they can extract the device identifier of the Bluetooth® device from it and use it to discover the device.

[0032] In this embodiment, the execution entity may be a terminal device shown in FIG. 1, for example, a smartphone equipped with a Bluetooth module and an IoT platform client, and the execution entity calls the Bluetooth module in the backend via the client to receive broadcast packets of the Bluetooth device to be connected.

[0033] In one specific example, a Bluetooth® device vendor may pre-configure parameters for the Bluetooth® device at a developer center for IoT platform vendors. For example, the parameter may include an offset address in the ADType=0xFF field in the broadcast packet. The IoT platform then transmits the parameters to a client in the execution entity. In this way, when the execution entity receives the broadcast packet of the Bluetooth® device, it can extract the device identifier of the Bluetooth® device based on the offset address.

[0034] It should be noted that if the executing entity cannot extract the device identifier of the Bluetooth® device from the broadcast packet, it means that the Bluetooth® device is not a legitimate access device of the IoT platform, and the Bluetooth® device is not applicable to the method for data interaction provided by the present disclosure.

[0035] In step 202, the device identifier is searched for in a pre-defined device list.

[0036] In this embodiment, the device list includes device identifiers of connectable Bluetooth® devices. For example, a Bluetooth® device vendor may pre-register a unique device identifier of the Bluetooth® device at a developer center for IoT platform vendors. The IoT platform then adds the device identifier of the Bluetooth® device to the device list and distributes the device list to the executing entity. This allows the executing entity to search the device list to determine whether the Bluetooth® device that transmitted the broadcast packet in step 201 is a legitimate access device of the IoT platform, and to filter out Bluetooth® devices that do not exist in the device list.

[0037] In step 203, in response to determining that the device identifier exists in the device list, it is determined whether a pre-configured application protocol exists in the Bluetooth® device.

[0038] In this embodiment, the presence of the device identifier of a Bluetooth device in the device list means that the Bluetooth device is an authorized access device of the IoT platform. For example, the executing entity can determine whether a pre-configured application protocol exists in the Bluetooth device by analyzing the broadcast packet received in step 201.

[0039] The application protocol in this embodiment is also called a profile or a configuration file. The pre-configured application protocol in a Bluetooth® device represents a set of protocols customized by a Bluetooth® device vendor according to the application scenario of the Bluetooth® device, and may include various types of protocol stacks that limit various functions of the Bluetooth® device. The connection and broadcast of a Bluetooth® device may be controlled, for example, by a Generic Access Profile (GAP), which enables the Bluetooth® device to be discovered by other devices and defines whether and how the Bluetooth® device can interact with other devices. As another example, the application protocol may further include protocol stacks corresponding to data transmission and protocol security.

[0040] In step 204, in response to determining that a pre-configured application protocol exists in the Bluetooth device, a Bluetooth transmission connection is established based on the application protocol.

[0041] Typically, the application protocol of a Bluetooth® device includes the Generic Attribute Profile (GATT), which is a common specification for sending and receiving very short data segments called attributes over a Bluetooth® transmission connection, by which a Bluetooth® device defines a connection between itself and other devices.

[0042] As an example, the execution entity can establish a Bluetooth transmission connection between the execution entity and the Bluetooth device based on GATT in an application protocol pre-set in the Bluetooth device, which may be, for example, BLE (Bluetooth Low Energy).

[0043] In some optional embodiments of this embodiment, the method further includes, in response to determining that no application protocol is pre-configured in the Bluetooth® device, obtaining an application protocol of the IoT platform; and transmitting the application protocol of the IoT platform to the Bluetooth® device and establishing a Bluetooth® transmission connection based on the application protocol of the IoT platform.

[0044] In this embodiment, the application protocol of the IoT platform is an application protocol customized by the service provider of the IoT platform and may be pre-stored in the execution entity. If the execution entity detects that the Bluetooth device does not have a vendor-predefined application protocol, it may send the application protocol of the IoT platform to the Bluetooth device and establish a Bluetooth transmission connection according to the application protocol of the IoT platform. In this way, a Bluetooth device without a pre-defined application protocol can also establish a Bluetooth transmission connection between the Bluetooth device and a terminal device.

[0045] In step 205, an H5 module and configuration parameters corresponding to the Bluetooth device are obtained based on the device identifier.

[0046] In this embodiment, the H5 module is pre-configured with the interface specifications of the IoT platform and the analysis algorithm pre-configured by the vendor, and the configuration parameters represent the application protocol parameters pre-configured by the vendor. The H5 module is a plug-in built by the vendor based on the HTML5 standard, which is used to perform data interaction with the IoT platform according to the interface specifications of the IoT platform and analyze the data to be analyzed.

[0047] The configuration parameters are used to ensure data transmission between the executing entity and the Bluetooth device via the Bluetooth transmission connection established in step 204, and may include, for example, the type and structure of data uploaded by the Bluetooth device, and the connection mode for accessing the IoT platform, as well as the length of the device ID, big endian or little endian, and the offset address of the ADType=0xFF field.

[0048] In a specific example, a vendor may upload a pre-built H5 module and configuration parameters to an IoT platform, and then use the IoT platform to generate a correspondence list between the H5 module, configuration parameters, and the device identifier of the Bluetooth device, and deliver the correspondence list to the executing entity. Then, the executing entity may retrieve the correspondence list from a local storage space, search the correspondence list based on the device identifier extracted in step 201, and determine the H5 module and configuration parameters corresponding to the device identifier.

[0049] In some optional embodiments of this embodiment, the H5 module and configuration parameters may be obtained by the steps of sending a device identifier to a server of the IoT platform and instructing the server to identify the H5 module and configuration parameters corresponding to the device identifier based on a pre-set correspondence between the device identifier and the H5 module and configuration parameters, and receiving the H5 module and configuration parameters sent by the server.

[0050] In this embodiment, the correspondence between the device identifier and the H5 module and configuration parameters may be stored in the cloud, and the terminal device can retrieve the H5 module and configuration parameters corresponding to the device identifier from the cloud, thereby reducing the storage load of the terminal device.

[0051] In step 206, receive data to be analyzed sent by the Bluetooth device based on the configuration parameters, and transparently transmit the data to be analyzed to the H5 module.

[0052] In this embodiment, the executing entity can receive the data to be analyzed sent by the Bluetooth® device through the Bluetooth® transmission connection established in step 204, and transparently transmit the received data to be analyzed to the H5 module.

[0053] In one specific example, the Bluetooth device may be a weight scale, and the execution entity may be a user's smartphone, which may be equipped with an IoT platform client. The weight scale encodes weight data using a built-in Bluetooth module and transmits it to the user's smartphone. After the smartphone receives the data to be analyzed, the client directly transmits the data to be analyzed to the H5 module without performing any analysis processing on the data to be analyzed.

[0054] Then, the execution subject can perform the following steps by the H5 module:

[0055] In step 207, the data to be analyzed is analyzed using an analysis algorithm to obtain analyzed data.

[0056] The analysis algorithm in the H5 module is generated by the vendor based on the application protocol of the Bluetooth device, in this way the analysis step of the data to be analyzed by the H5 module can be completed.

[0057] In step 208, the analyzed data is sent to the IoT platform based on the interface specification of the IoT platform.

[0058] In this embodiment, the executing entity can establish a Bluetooth transmission connection between the client of the IoT platform and the Bluetooth device based on the application protocol pre-set in the Bluetooth device. The client is only used to receive data to be analyzed from the Bluetooth device. The analysis and transmission of data are performed by the H5 module.

[0059] Next, refer to FIG. 3, which is a schematic diagram of one example of the embodiment of the method shown in FIG. 2. In FIG. 3, the Bluetooth® device 301 is a smart bracelet that can monitor a user's physiological data, such as sleep status and heart rate data, and its Bluetooth® module is pre-configured with a vendor-customized application protocol. The execution entity 302 is a smartphone equipped with an IoT platform client. The server 303 is the IoT platform server. When a user needs to obtain services from the IoT platform, they can open the IoT platform client on their smartphone and bring the smart bracelet close to the smartphone. The smart bracelet transmits a broadcast packet 304 based on the vendor-customized application protocol. After receiving the broadcast packet, the smartphone extracts the smart bracelet's device identifier from the broadcast packet and then searches for the presence of the device identifier in its device list. If the device identifier is present, the verification is successful. The smartphone then obtains the H5 module 306 and configuration parameters corresponding to the device identifier and receives the data to be analyzed 305 transmitted by the smart bracelet based on the configuration parameters. The data to be analyzed is generated by the smart bracelet encoding the collected physiological data based on the application protocol. Then, the smartphone transparently transmits the data to be analyzed to the H5 module. The H5 module analyzes the data to be analyzed using an analysis algorithm preset by the vendor, and obtains analyzed data 307 (which may include, for example, heart rate data and sleep data). Finally, the H5 module transmits the analyzed data to the server 303, thereby completing the connection between the smart bracelet and the IoT platform.

[0060] The method and apparatus for data interaction provided by the embodiments of the present disclosure include: when a Bluetooth device sends a broadcast packet, extracting a device identifier of the Bluetooth device from the broadcast packet, and determining whether the Bluetooth device meets a connection condition based on the device identifier; when determining that the Bluetooth device meets the connection condition, obtaining an H5 module and configuration parameters corresponding to the Bluetooth device; if a pre-configured application protocol exists in the Bluetooth device, establishing a Bluetooth transmission connection based on the pre-configured application protocol in the Bluetooth device; receiving data to be analyzed sent by the Bluetooth device; transparently transmitting the data to be analyzed to an H5 module pre-implemented by the vendor; analyzing the data to be analyzed through the H5 module; and transmitting the analyzed data to an IoT platform. The connection between the Bluetooth® device and the IoT platform can be realized without requiring the Bluetooth® device to support the application protocol provided by the IoT platform, thereby realizing data interaction between the Bluetooth® device and the IoT platform and improving the efficiency and convenience of the connection between the Bluetooth® device and the IoT platform.

[0061] In some optional embodiments of the above embodiments, the H5 module further includes an interface specification of a vendor server, and a data processing algorithm is pre-configured in the vendor server, and the method further includes the steps of, based on the interface specification of the vendor server, sending the analyzed data to the vendor server and instructing the vendor server to call the data processing algorithm to process the analyzed data, receiving the processed data sent by the vendor server, and sending the processed data to the IoT platform, by the H5 module.

[0062] In this embodiment, the H5 module may further call data processing algorithms on the vendor's cloud, process the analyzed data according to the vendor's customized data processing policy, and send the processed data to the IoT platform. This solves the limitations on the power consumption and storage space of Bluetooth devices and improves the data processing capabilities and flexibility of Bluetooth devices, especially for scenarios where the processing of Bluetooth data is more complex.

[0063] Further, reference is made to Fig. 4, which illustrates signaling 400 of an embodiment of a method for data interaction, including the following steps:

[0064] In step 401, the Bluetooth device transmits a broadcast packet.

[0066] In step 402, the client of the IoT platform installed in the terminal device extracts the device identifier of the Bluetooth device from the broadcast packet.

[0067] In step 403, the client retrieves the device list.

[0068] In step 404, H5 and composition Parameter Ta Get it.

[0069] In step 405, a Bluetooth transmission connection is established.

[0070] In step 406, the Bluetooth® device reports the data to the client, which is the data to be analyzed.

[0071] In step 407, the client transparently transmits the data to be analyzed to H5.

[0072] In step 408, data analysis is performed by H5.

[0073] In step 409, H5 sends the parsed data to the vendor server.

[0074] In step 410, the vendor server invokes a pre-configured algorithm to process the parsed data.

[0075] In step 411, the vendor server returns the parsed data to H5.

[0076] In step 412, H5 sends the analyzed data to the IoT platform.

[0077] Steps 401 to 412 in this embodiment correspond to the above-mentioned steps 201 to 208, and therefore a description thereof will be omitted here.

[0078] In some optional embodiments of this embodiment, the configuration parameters include a device access mode; In response to determining that the access mode of the Bluetooth device is a connection-oriented access mode, the method further includes the steps of:

[0079] In step 413, the IoT platform delivers the data to H5.

[0080] In step 414, H5 transparently transmits the broadcasted data to the Bluetooth device.

[0081] When the access mode of the Bluetooth device is a broadcast-oriented access mode, the data interaction process between the Bluetooth device and the terminal device only includes one-way transmission from the Bluetooth device to the terminal device. When the access mode of the Bluetooth device is a connection-oriented access mode, the Bluetooth device can also receive data broadcast by the terminal device, that is, realize two-way transmission between the Bluetooth device and the IoT platform.

[0082] As can be seen from Figure 4, the embodiment shown in Figure 4 embodies the step of the H5 module calling the data processing algorithm installed in the cloud by the vendor to process the analyzed data, solving the limitations on the data processing ability of the power consumption and storage space of the Bluetooth® device, improving the ability and flexibility of processing Bluetooth® data, and especially applicable to scenes involving Bluetooth® data and more complex processing.

[0083] Further referring to FIG. 5, as an implementation of the method shown in each of the above figures, the present disclosure provides an embodiment of an apparatus for data interaction, which embodiment of the apparatus corresponds to the embodiment of the method shown in FIG. 2, and which can be specifically applied to various electronic devices.

[0084] As shown in FIG. 5 , the apparatus 500 for data interaction of this embodiment includes: a device discovery unit 501 configured to, in response to a broadcast packet sent by a Bluetooth device, extract a device identifier of the Bluetooth device from the broadcast packet; a list search unit 502 configured to search for the device identifier in a preset device list including device identifiers of connectable Bluetooth devices; a protocol detection unit 503 configured, in response to determining that the device identifier exists in the device list, to determine whether a preset application protocol exists in the Bluetooth device; and a connection establishment unit configured, in response to determining that the preset application protocol exists in the Bluetooth device, to establish a Bluetooth transmission connection based on the application protocol. 504; an information acquiring unit 505 configured to acquire an H5 module and configuration parameters corresponding to the Bluetooth device based on the device identifier, where the H5 module is pre-configured with an interface specification of an IoT platform and an analysis algorithm pre-configured by a vendor, and the configuration parameters represent parameters of an application protocol pre-configured by the vendor; a data transparent transmitting unit 506 configured to receive the data to be analyzed sent by the Bluetooth device based on the configuration parameters, and transparently transmit the data to be analyzed to the H5 module; and a data interaction unit 507 configured by the H5 module to perform: analyzing the data to be analyzed using the analysis algorithm to obtain analyzed data, and sending the analyzed data to the IoT platform based on the interface specification of the IoT platform.

[0085] In this embodiment, the connection establishment unit 504 further includes: a protocol acquisition module configured to acquire an application protocol of the IoT platform in response to determining that no application protocol is pre-configured in the Bluetooth device; and a protocol transmission module configured to send the application protocol of the IoT platform to the Bluetooth device and establish a Bluetooth transmission connection based on the application protocol of the IoT platform.

[0086] In this embodiment, the information acquiring unit 505 further includes: a device identifier sending module configured to send the device identifier to a server of the IoT platform and instruct the server to identify the H5 module and configuration parameters corresponding to the device identifier based on a preset correspondence between the device identifier and the H5 module and configuration parameters; and an information receiving module configured to receive the H5 module and configuration parameters sent by the server.

[0087] In this embodiment, the H5 module further includes an interface specification of a vendor server, and a data processing algorithm is pre-configured in the vendor server; and the data interaction unit 507 is further configured, based on the interface specification of the vendor server, to perform the following by the H5 module: sending the parsed data to the vendor server and instructing the vendor server to call the data processing algorithm to process the parsed data; receiving the processed data sent by the vendor server; and sending the processed data to the IoT platform.

[0088] In this embodiment, the configuration parameters include a device access mode, and the data interaction unit 507 is further configured to, in response to determining that the device access mode is a connection-oriented access mode, receive distribution data sent by the IoT platform and transparently transmit the distribution data to the Bluetooth® device, via the H5 module.

[0089] Reference will now be made to FIG. 6, which shows a structural schematic diagram of an electronic device (e.g., the server or terminal device shown in FIG. 1) 600 applied to realizing an embodiment of the present disclosure. Terminal devices in the embodiment of the present disclosure include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), and PADs (Tablet Computers), as well as fixed terminals such as digital TVs and desktop computers. The terminal device shown in FIG. 6 is merely an example and does not impose any limitations on the functions and scope of use of the embodiment of the present disclosure.

[0090] 6, electronic device 600 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 601 capable of performing various appropriate operations and processes according to programs stored in read-only memory (ROM) 602 or programs loaded from storage device 608 into random access memory (RAM) 603. RAM 603 further stores various programs and data necessary for the operation of electronic device 600. Processing unit 601, ROM 602, and RAM 603 are connected to one another via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0091] Typically, the following devices may be connected to the I / O interface 605: input devices 606 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), speakers, vibrators, etc.; storage devices 608 including, for example, a magnetic tape, hard disk, etc.; and communication devices 609. The communication devices 609 enable the electronic device 600 to communicate wirelessly or via wires with other devices to exchange data. While FIG. 6 illustrates the electronic device 600 with various devices, it should be understood that not all of the illustrated devices are required to be implemented or included. Optionally, more or fewer devices may be implemented. Each block illustrated in FIG. 6 may represent one device or multiple devices, if desired.

[0092] In particular, according to embodiments of the present disclosure, the processes described with reference to the flowcharts above may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product including a computer program embodied in a computer-readable medium, the computer program including program code for executing the methods illustrated in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via the communication device 609, or may be installed from the storage device 608 or the ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined by the methods of the embodiments of the present disclosure. Note that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical memory, a magnetic memory, or any suitable combination thereof, electrically connected by one or more conductors. In embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program usable by, or embodied in, an instruction execution system, apparatus, or device. In embodiments of the present disclosure, a computer-readable signal medium may include a data signal, in baseband or propagated as part of a carrier wave, having computer-readable program code carried therein.Such propagated data signals may take various forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium. The computer-readable signal medium may transmit, propagate, or transmit a program used by or embedded in an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium may be transmitted over any suitable medium, including, but not limited to, electrical wire, optical cable, RF (radio frequency), etc., or any suitable combination thereof.

[0093] The computer-readable medium may be included in the electronic device, or may exist separately from the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, perform the following steps: in response to a broadcast packet transmitted by a Bluetooth device, extracting a device identifier of the Bluetooth device from the broadcast packet; searching for the device identifier in a pre-defined device list including device identifiers of connectable Bluetooth devices; in response to determining that the device identifier exists in the device list, determining whether a pre-defined application protocol exists in the Bluetooth device; and in response to determining that the pre-defined application protocol exists in the Bluetooth device, establishing a Bluetooth transmission connection based on the application protocol. and acquiring, based on the device identifier, an H5 module and configuration parameters corresponding to the Bluetooth device, wherein the H5 module is pre-configured with an interface specification of an IoT platform and an analysis algorithm pre-configured by a vendor, and the configuration parameters represent parameters of an application protocol pre-configured by the vendor; receiving, based on the configuration parameters, data to be analyzed sent by the Bluetooth device, and transparently transmitting the data to be analyzed to the H5 module; and analyzing the data to be analyzed using the analysis algorithm to obtain analyzed data, and transmitting the analyzed data to the IoT platform based on the interface specification of the IoT platform, by the H5 module.

[0094] Computer program code for carrying out operations of embodiments of the present disclosure can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code can run entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. If remote, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via Internet service provided by an Internet service provider).

[0095] The flowcharts and block diagrams in the figures are illustrative examples of architecture, functionality, and operation that may be implemented by systems, methods, and computer programs according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code. The module, program segment, or portion of code includes one or more executable instructions for implementing a given logical function. It should be noted that, in some alternative implementations, the functions shown in the blocks may be executed in a different order than that shown in the figures. For example, two blocks shown in succession may actually be executed substantially in parallel, or may sometimes be executed in the reverse order, depending on the functionality involved. It should be noted that all blocks in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented in a dedicated hardware-based system that performs the given functions or operations, or in a combination of dedicated hardware and computer instructions.

[0096] The units described in the embodiments of the present disclosure may be implemented in software or hardware. The described units may be configured in a processor, and may be described, for example, as "a processor including a device discovery unit, a list search unit, a protocol detection unit, a connection establishment unit, an information acquisition unit, a data transparent transmission unit, and a data interaction unit." Here, the names of these units may not necessarily limit the units themselves. For example, the discovery unit may be described as "a unit for, in response to a broadcast packet transmitted by a Bluetooth device, extracting a device identifier of the Bluetooth device from the broadcast packet."

[0097] The above description merely describes preferred embodiments of the present disclosure and the technical principles applied thereto. Those skilled in the art should understand that the scope of the present disclosure is not limited to a technical solution consisting of a specific combination of the above-described technical features, but should also include other technical solutions consisting of any combination of the above-described technical features or their equivalent features within the scope of the above-described spirit of the present disclosure. For example, technical solutions may be created by replacing the above features with (but not limited to) technical features having similar functions disclosed in the embodiments of the present disclosure. [Explanation of symbols]

[0098] 100 System Architecture 101 Smart Bracelet 102 Headset 103 Weight scale 104 Terminal Equipment 105 Network 106 Server 200 Flow 201 steps 202 steps 203 steps 204 steps 205 steps 206 steps 207 steps 208 steps 301 Bluetooth® Device 302 Executing Body 303 Server 304 broadcast packet 305 Data 306 Modules 307 Data 400 Signaling 401 Steps 402 Step 403 Step 404 Step 405 Steps 406 Steps 407 Steps 408 Steps 409 Steps 410 steps 411 steps 412 steps 413 steps 414 steps 500 devices 501 Device Discovery Unit 502 List Search Unit 503 Protocol Detection Unit 504 Connection Establishment Unit 505 Information Acquisition Unit 506 Data Transparent Transmission Unit 507 Data Interaction Unit 600 Electronic equipment 601 Processing equipment 602 Dedicated memory (ROM) 603 Random Access Memory (RAM) 604 Bus 605 I / O interface 606 Input Device 607 Output Device 608 Storage device 609 Communication Equipment

Claims

1. 1. A method for data interaction, comprising: in response to a broadcast packet transmitted by a target Bluetooth device, extracting a target device identifier of the target Bluetooth device from the broadcast packet; searching for the target device identifier in a pre-defined device list containing device identifiers of connectable Bluetooth devices; determining whether a pre-configured application protocol exists for the target Bluetooth device in response to determining that the target device identifier exists in the device list; In response to determining that a pre-configured application protocol exists in the target Bluetooth device, establishing a Bluetooth transmission connection based on the application protocol; obtaining an H5 module and configuration parameters corresponding to the target Bluetooth device based on the target device identifier, wherein the H5 module is pre-configured with an interface specification of an Internet of Things (IoT) platform and an analysis algorithm pre-configured by a vendor, and the configuration parameters represent parameters of the application protocol pre-configured by a vendor; receiving data to be analyzed sent by the target Bluetooth device based on the configuration parameters, and transparently transmitting the data to be analyzed to the H5 module; Using the H5 module, analyze the data to be analyzed using the analysis algorithm to obtain analyzed data, and send the analyzed data to the IoT platform according to an interface specification of the IoT platform; A method for data interaction comprising:

2. In response to determining that the target Bluetooth® device does not have a pre-configured application protocol, obtaining an application protocol of the IoT platform; Sending an application protocol of the IoT platform to the target Bluetooth device, and establishing a Bluetooth transmission connection based on the application protocol of the IoT platform; The method of claim 1 further comprising:

3. The H5 module and configuration parameters are: Sending the target device identifier to a server of the IoT platform, and instructing the server to identify an H5 module and configuration parameters corresponding to the target device identifier based on a preset correspondence relationship between the device identifier and an H5 module and configuration parameters; 2. The method of claim 1, wherein the H5 module and configuration parameters are obtained by:

4. The H5 module further includes an interface specification of a vendor server, and a data processing algorithm is pre-configured in the vendor server; The method comprises:

2. The method of claim 1, further comprising the steps of: sending the parsed data to the vendor server based on an interface specification of the vendor server, thereby instructing the vendor server to invoke the data processing algorithm to process the parsed data, receiving the processed data sent by the vendor server, and sending the processed data to the IoT platform, by the H5 module.

5. The configuration parameters include a device access mode; The method comprises: The method of any one of claims 1 to 4, further comprising the step of receiving, by the H5 module, broadcast data sent by the IoT platform and transparently transmitting the broadcast data to the target Bluetooth device in response to determining that the device access mode is a connection-oriented access mode.

6. 1. An apparatus for data interaction, comprising: a device discovery unit configured to, in response to a broadcast packet transmitted by a target Bluetooth device, extract a target device identifier of the target Bluetooth device from the broadcast packet; a list retrieval unit configured to retrieve the target device identifier in a pre-defined device list containing device identifiers of connectable Bluetooth devices; a protocol detection unit configured to determine whether a pre-configured application protocol exists in the target Bluetooth® device in response to determining that the target device identifier exists in the device list; a connection establishment unit configured to, in response to determining that a pre-configured application protocol exists in the target Bluetooth device, establish a Bluetooth transmission connection based on the application protocol; an information acquiring unit configured to acquire an H5 module and configuration parameters corresponding to the target Bluetooth device based on the target device identifier, wherein the H5 module is pre-configured with an interface specification of an Internet of Things (IoT) platform and an analysis algorithm pre-configured by a vendor, and the configuration parameters represent parameters of the application protocol pre-configured by a vendor; a data transparent transmission unit configured to receive data to be analyzed sent by the target Bluetooth device based on the configuration parameters, and transparently transmit the data to be analyzed to the H5 module; a data interaction unit configured to perform, by the H5 module: analyzing the data to be analyzed using the analysis algorithm to obtain analyzed data; and sending the analyzed data to the IoT platform according to an interface specification of the IoT platform; 10. An apparatus for data interaction comprising:

7. The connection establishment unit a protocol acquisition module configured to acquire an application protocol of the IoT platform in response to determining that a pre-configured application protocol does not exist in the target Bluetooth® device; 7. The apparatus of claim 6, further comprising: a protocol sending module configured to send an application protocol of the IoT platform to the target Bluetooth device and establish a Bluetooth transmission connection based on the application protocol of the IoT platform.

8. The information acquisition unit a device identifier sending module configured to send the target device identifier to a server of the IoT platform and instruct the server to identify an H5 module and configuration parameters corresponding to the target device identifier based on a preset correspondence between the device identifier and an H5 module and configuration parameters; The apparatus of claim 6 , further comprising: an information receiving module configured to receive the H5 module and configuration parameters sent by the server.

9. The H5 module further includes an interface specification of a vendor server, and a data processing algorithm is pre-configured in the vendor server; The data interaction unit further comprises:

7. The device of claim 6, wherein the H5 module is configured to: send the analyzed data to the vendor server based on an interface specification of the vendor server, thereby instructing the vendor server to invoke the data processing algorithm to process the analyzed data; receive the processed data sent by the vendor server; and send the processed data to the IoT platform.

10. The configuration parameters include a device access mode; The data interaction unit further comprises: The apparatus of any one of claims 6 to 9, wherein the apparatus is configured to receive broadcast data sent by the IoT platform and transparently transmit the broadcast data to the target Bluetooth® device, by the H5 module, in response to determining that the device access mode is a connection-oriented access mode.

11. An electronic device comprising one or more processors and a storage device storing one or more programs, An electronic device, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for data interaction according to any one of claims 1 to 4.

12. A computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method for data interaction according to any one of claims 1 to 4.

13. A computer program comprising: A computer program which, when executed by a processor, implements the method for data interaction according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Gateway of Internet of things and automatic adaptation method of communication protocol

    CN101984706A

  • Method and device for automatically determining Bluetooth communication parameters, and storage medium

    CN107404705A

  • Communication method, communication device, electronic apparatus, and computer readable storage medium

    JP2020109966A

  • Portable electrical device, external entity, and system comprising them

    US20140320677A1

  • Information terminal device, motion capture system, and motion capture method

    WO2016035884A1