CN116266845B - Data transmission method and device - Google Patents
Data transmission method and device Download PDFInfo
- Publication number
- CN116266845B CN116266845B CN202211534692.9A CN202211534692A CN116266845B CN 116266845 B CN116266845 B CN 116266845B CN 202211534692 A CN202211534692 A CN 202211534692A CN 116266845 B CN116266845 B CN 116266845B
- Authority
- CN
- China
- Prior art keywords
- data
- bluetooth
- format
- data format
- data packet
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 230000005540 biological transmission Effects 0.000 title claims abstract description 39
- 238000004891 communication Methods 0.000 claims abstract description 20
- 230000004044 response Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 abstract description 19
- 238000007405 data analysis Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 238000013499 data model Methods 0.000 description 5
- 230000006855 networking Effects 0.000 description 4
- 238000012795 verification Methods 0.000 description 3
- 241000227653 Lycopersicon Species 0.000 description 2
- 235000007688 Lycopersicon esculentum Nutrition 0.000 description 2
- 238000010411 cooking Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000001816 cooling Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010025 steaming Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000005303 weighing Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W80/00—Wireless network protocols or protocol adaptations to wireless operation
- H04W80/06—Transport layer protocols, e.g. TCP [Transport Control Protocol] over wireless
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the specification provides a data transmission method and device, wherein the method comprises the following steps: after acquiring Bluetooth data sent by a second device through Bluetooth broadcasting, generating a first data packet with a preset data format by a first device, wherein the preset data format comprises a first data format describing self attribute data and a second data format describing extended attribute data, and the extended attribute data comprises the Bluetooth data; and transmitting the first data packet to a cloud server through Wi-Fi communication, so that the cloud server issues a control instruction by analyzing the first data packet. The method can simplify the flow of data analysis of the cloud server so as to improve the data processing efficiency.
Description
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a data transmission method and apparatus.
Background
In a device group formed by a plurality of devices, in order to save communication cost, a Wi-Fi module and a Bluetooth module are generally configured on a main device, and only a Bluetooth module is configured on a plurality of sub-devices, wherein the main device has Wi-Fi communication capability and can communicate with a cloud server, and also can be connected with a plurality of sub-devices through Bluetooth, and the sub-devices have only Bluetooth communication capability.
The sub-device needs to upload data to the cloud by using the main device through Bluetooth communication, at this time, the main device takes on the role of a gateway, and is used as a data channel to transmit the sub-device data to the cloud, and the main device is only responsible for transmitting the transmitted content from a source address to a destination address without any change to the service data content. For example, when the gateway device a receives bluetooth data of the sub-device B and the device a transparently uploads the data of the device B to the cloud, the cloud receives the data of the device B. The cloud end is used for analyzing the sub-device data and judging what device uses the sub-device data. However, in the case that the data of the sub-device is the data required to be used by the main device, the main device is required to upload the data of the sub-device to the cloud end, and then the data is issued to the main device by the cloud end for processing, so that the processing process is very complicated.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide at least one data transmission method and apparatus.
Specifically, the embodiment of the specification is realized through the following technical scheme:
in a first aspect, a data transmission method is provided, the method including:
after acquiring Bluetooth data sent by a second device through Bluetooth broadcasting, generating a first data packet with a preset data format by a first device, wherein the preset data format comprises a first data format describing self attribute data and a second data format describing extended attribute data, and the extended attribute data comprises the Bluetooth data;
and transmitting the first data packet to a cloud server through Wi-Fi communication, so that the cloud server issues a control instruction by analyzing the first data packet.
In the technical scheme, when the first device (namely the main device) uploads the received Bluetooth data of the second device (namely the sub device), the Bluetooth data of the second device is used as the expansion attribute data of the second data format and the attribute data of the first data format to generate the first data packet, and the first data packet is uploaded to the cloud server, so that the cloud server can analyze the expansion attribute data based on the first data packet and directly issue a control instruction to the first device associated with the first data packet, the target device to be issued does not need to be searched, the data analysis flow is simplified, and the processing efficiency is improved.
In some optional embodiments, the first data format is a Wi-Fi data format, and the generating the first data packet in the preset data format includes:
and converting the Bluetooth data from a Bluetooth data format into the second data format, and adding the Bluetooth data into a Wi-Fi data format containing the attribute data of the first equipment to obtain a first data packet with a preset data format.
After receiving the Bluetooth data in the Bluetooth data format, the first device analyzes and converts the Bluetooth data into a second data format describing the extended attribute data, and adds the second data format to the Wi-Fi data format containing the attribute data of the device, so that the Bluetooth data is uploaded to the cloud server as the extended attribute data, and the relevance between the Bluetooth data and the first device is increased.
In some alternative embodiments, after the acquiring bluetooth data sent by the second device through bluetooth broadcast, the method further includes:
checking whether the product type of the second device in the Bluetooth data is in a first white list or not, wherein the first white list is used for recording the product type supporting interconnection with the first device;
and discarding the Bluetooth data if the Bluetooth data is not in the first white list.
The first device further has a device verification function, and before a first data packet with a preset data format is generated, bluetooth data is verified to filter out influences of devices with unscheduled product types on data transmission, so that the situation that data transmission is blocked by broadcasting data of irrelevant devices and data processing of a cloud is interfered is avoided, and the efficiency of the data processing is guaranteed.
In some alternative embodiments, after said checking whether the product type of the second device in the bluetooth data is in the first whitelist, the method further comprises:
if the device identifier is in the first white list, checking whether the device identifier of the second device is in a second white list of the first 5 devices, wherein the second white list is used for recording the device identifier which is interconnected with the first device;
discarding the Bluetooth data if the Bluetooth data is not in the second white list;
and if the first data packet is in the second white list, generating the first data packet with the preset data format.
The first device can further check the Bluetooth data according to the second white list, so that the device for data transmission can be managed conveniently by 0 user through the second white list.
In some optional embodiments, the generating the first data packet in the preset data format includes:
judging the broadcasting type of the Bluetooth data according to the identification of the Bluetooth data, and generating a first data packet with a preset data format in response to determining that the broadcasting type of the Bluetooth data is state type broadcasting.
According to the different broadcasting types of the Bluetooth data, the first device can perform different processing 5 on the Bluetooth data so as to improve the processing efficiency.
In some alternative embodiments, the method further comprises:
and transmitting request response information through Bluetooth in response to determining that the broadcasting type of the Bluetooth data is request type broadcasting.
For request broadcasting, the cloud end is not required to be uploaded for processing, the processing load of the cloud end is reduced, meanwhile, the second equipment is prevented from being in a broadcasting state all the time, and the first equipment is occupied for subscribing and receiving data channels of Bluetooth broadcasting of other second equipment.
In some optional embodiments, the attribute data of the preset data format includes a status parameter generated by the first device; the extended attribute data in the preset data format comprises at least one of the following: second one
The device identification of the device, the product type of the second device, the device model of the second device, the sensor 5 attribute name of the second device, the sensor attribute type of the second device, the sensor attribute value of the second device.
In a second aspect, there is provided a data transmission apparatus, the apparatus comprising:
the data generation module is used for generating a first data packet with a preset data format after acquiring Bluetooth data sent by second equipment through Bluetooth broadcasting, wherein the preset data format comprises a first data format describing self attribute data and a second data format describing extended attribute data, and the extended attribute data comprises the Bluetooth data;
the data uploading module is used for transmitting the first data packet to a cloud server through Wi-Fi communication, so that the cloud server can send a control instruction through analyzing the first data packet.
In a third aspect, a data transmission method is provided and applied to a data transmission system, where the system includes a first device, at least one second device, and a cloud server, and the method includes:
any second device transmits Bluetooth data through Bluetooth broadcasting;
after the first device obtains Bluetooth data sent by the second device through Bluetooth broadcasting, a first data packet in a preset data format is generated, the preset data format comprises a first data format describing self attribute data and a second data format describing extended attribute data, the extended attribute data comprises the Bluetooth data, and the first data packet is transmitted to a cloud server through Wi-Fi communication;
after the cloud server receives and analyzes the first data packet, responding to the analyzed Bluetooth data to trigger a control flow, and issuing a control instruction to the first device associated with the first data packet;
and after the first equipment receives the control instruction, executing the control instruction.
In a fourth aspect, a data transmission system is provided, the system comprising a first device, at least one second device, and a cloud server, wherein,
any one of the second devices transmits Bluetooth data through Bluetooth broadcasting;
the first device generates a first data packet with a preset data format after acquiring Bluetooth data sent by the second device through Bluetooth broadcasting, wherein the preset data format comprises a first data format describing self attribute data and a second data format describing extended attribute data, the extended attribute data comprises the Bluetooth data, and the first data packet is transmitted to a cloud server through Wi-Fi communication; executing the control instruction after receiving the control instruction;
and after receiving and analyzing the first data packet, the cloud server responds to the analyzed Bluetooth data to trigger a control flow and issues a control instruction to the first device associated with the first data packet.
In a fifth aspect, an electronic device is provided, the device comprising a memory, a processor, the memory for storing computer instructions executable on the processor, the processor for implementing a data transmission method as described in any of the embodiments of the present specification when the computer instructions are executed.
In a sixth aspect, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements a data transmission method according to any of the embodiments of the present specification.
Drawings
In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the related art, the drawings that are required for the description of the embodiments or the related art will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments described in one or more embodiments of the present specification, and other drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a schematic diagram of a current data model shown in at least one embodiment of the present description;
FIG. 2 is a flow chart of a data transmission method shown in at least one embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an extended data model shown in at least one embodiment of the present description;
FIG. 4 is a schematic diagram of a broadcast format of an attribute portion of a data packet shown in at least one embodiment of the present disclosure;
fig. 5 is a block diagram of a data transmission device according to at least one embodiment of the present disclosure;
fig. 6 is a block diagram of yet another data transmission device shown in at least one embodiment of the present disclosure;
FIG. 7 is a schematic diagram of one device interaction shown in at least one embodiment of the present disclosure;
fig. 8 is a schematic diagram of a hardware structure of an electronic device according to at least one embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present description as detailed in the accompanying claims.
The terminology used in the description presented herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The first device (i.e., main device) and the second device (i.e., sub device) described in the present specification generally refer to electrical products for various applications in home environments, business environments, and other environments, for example, may be cooking appliances with a certain cooking function, such as an electric pressure cooker, an electric frying pan, a coffee machine, and the like, and may also be appliances with a certain cooling function, such as an air conditioner, a refrigerator, and the like.
The first device and the second device described in this specification have conventional structures and functions (such as product housing, power interface, basic home appliance function, etc.) of the electric products currently on the market, and this specification is not particularly described.
In the prior art, data generated by a main device and a sub device are mutually independent when the cloud is reported, and have no relevance, the used data model is shown in fig. 1, the sub device is directly connected with a data channel of a cloud server by means of the main device for transmission and reporting, when the cloud server analyzes and computes sub device data, and when the data meets specific conditions, a control flow is triggered, a gateway device (main device) is controlled to execute processing through a issuing instruction, and when the equipment which is related to the analyzed data and needs to execute the data is computed, a certain computing resource and time are required to be consumed, so that the main device can be found.
In the technical scheme provided by the embodiment, the main device generates the first data packet by taking the bluetooth data of the sub-device as the extended attribute data of the second data format and the self attribute data of the first data format of the device itself, and uploads the first data packet to the cloud server, the main device can take the data of the sub-device as self data, and the data of the main device and the data of the sub-device are uploaded to the cloud together, namely, the data of the sub-device is taken as a part of the data of the main device, when the data of the sub-device needs to be consumed by the main device, the cloud can easily know that the data of the sub-device is to be issued to the main device for processing according to the data packet of the extended attribute data, and does not need to search for the target device to be issued, so that the analysis operand is small, the flow of data analysis is simplified, and the data processing efficiency is improved.
As shown in fig. 2, fig. 2 is a flowchart of a data transmission method according to at least one embodiment of the present disclosure, where the method is applied to a first device in a data transmission system, the system includes the first device, at least one second device, and a cloud server, the first device has a Wi-Fi module and a bluetooth module, and the second device includes the bluetooth module, and includes the following steps:
in step 102, after the first device obtains bluetooth data sent by the second device through bluetooth broadcast, a first data packet with a preset data format is generated, where the preset data format includes a first data format describing attribute data of the first device and a second data format describing extended attribute data, and the extended attribute data includes the bluetooth data.
In step 104, the first data packet is transmitted to a cloud server through Wi-Fi communication, so that the cloud server issues a control instruction by analyzing the first data packet.
After any second device generates data to be uploaded to the cloud server, the second device does not have Wi-Fi communication capability required by the cloud server, so that the second device transmits the data to the first device with Wi-Fi communication capability through the Bluetooth module of the second device, for example, a connection-free Bluetooth broadcasting mode is used.
The first device receives Bluetooth data sent by the second device through the Bluetooth module, takes the received Bluetooth data as extended attribute data of a second data format, and reports the extended attribute data and self attribute data generated by the first device to the cloud through the first data packet.
The preset data format includes a first data format describing attribute data of the preset data format and a second data format describing extended attribute data, and the embodiment is not limited to a specific format of the preset data format.
In one embodiment, the first data format is a Wi-Fi data format, and the generating the first data packet with the preset data format includes: and converting the Bluetooth data from a Bluetooth data format into the second data format, and adding the Bluetooth data into a Wi-Fi data format containing the attribute data of the first equipment to obtain a first data packet with a preset data format.
In this embodiment, extended attribute data is added on the basis of the original data model of the data packet in the Wi-Fi data format, as shown in fig. 3, in the data model in the preset data format designed in this scheme, in addition to the original attribute (own) including the attribute data of the first device, the newly added attribute (extension) is used as extended attribute data, and when the bluetooth data is converted into the second data format, method information in the bluetooth data of the second device is deleted, and attribute information is added to the attribute (extension).
After receiving the Bluetooth data in the Bluetooth data format, the first device analyzes and converts the Bluetooth data into a second data format describing the extended attribute data, and adds the second data format to the Wi-Fi data format containing the attribute data of the device, so that the Bluetooth data is uploaded to the cloud server as the extended attribute data, and the relevance between the Bluetooth data and the first device is increased.
The self attribute data in the preset data format comprises state parameters generated by the first equipment; the extended attribute data in the preset data format comprises at least one of the following: the device identification of the second device, the product type of the second device, the device model of the second device, the sensor attribute name of the second device, the sensor attribute type of the second device, the sensor attribute value of the second device.
For example, in the attribute (extension), the equipment category, the equipment identifier, the equipment unique code (which may be the MAC address of the bluetooth module of the equipment), the equipment sensor attribute name, the equipment attribute type, the equipment sensor attribute value and the timestamp are all information carried in the bluetooth data sent by the second equipment. For example, when the second device is a kitchen scale, after the kitchen scale is weighed, the generated bluetooth data content is 200g of tomato weight, wherein the attribute name of the device sensor is tomato, the attribute type of the device sensor is weight, and the attribute value of the device sensor is 200g. And after the first equipment steaming and baking box receives the Bluetooth data, the weighing data are written into an expansion attribute field of the data packet, and the cloud end is uploaded through the Wi-Fi module.
The data packet with the preset data format, which is designed by the scheme, can realize that the data of the cloud end reported by the second device belongs to the first device and is the expansion attribute data of the first device, when the first device uploads the Bluetooth data of the second device, the first device does not adopt a data transparent transmission mode to upload the data of the second device, but takes the data of the second device as a part of the data of the first device and is used as the data indirectly obtained by the first device, so that when the cloud end server receives the uploaded expansion first data packet, the cloud end server can analyze based on the expansion attribute data of the first data packet, when determining that the Bluetooth data triggers the control flow to be consumed by a device of a certain device type, the first device associated with the first data packet is not required to be searched in a large range, but is directly locked when the first device is of the device type, and a corresponding control instruction is issued to the first device.
In an exemplary home environment, the temperature sensor (second device) sends the detected temperature data in a bluetooth broadcast manner, after the air conditioner (first device) configured with the Wi-Fi module receives the temperature data, the temperature data is converted into extended attribute data in the first data packet and uploaded to the cloud, after the cloud analyzes the extended attribute data of the first data packet, the cloud triggers a control flow of the air conditioner type device, the cloud does not need to search and match all the air conditioner type devices, and directly sends a control instruction to the air conditioner associated with the first data packet, for example, the air conditioner refrigerating temperature is adjusted to 26 degrees.
The control instruction comprises control operation information of the first device and information in Bluetooth data, and the first device consumes the Bluetooth data by executing the control instruction.
Since one bluetooth device receives bluetooth broadcast data of other devices within the broadcast range when receiving the broadcast of another bluetooth device, the first device receives the influence of other unplanned devices when subscribing to receive the bluetooth broadcast of the second device.
In some embodiments, after the acquiring bluetooth data sent by the second device via bluetooth broadcast, the method further comprises:
checking whether the product type of the second device in the Bluetooth data is in a first white list or not, wherein the first white list is used for recording the product type supporting interconnection with the first device;
and discarding the Bluetooth data if the Bluetooth data is not in the first white list.
In this embodiment, the bluetooth data includes a product type of the second device, the first device further has a device verification function, and before a first data packet with a preset data format is generated, the bluetooth data is verified, so as to filter out an influence of an unscheduled product type device on data transmission, avoid an unrelated device from broadcasting data to block the data transmission and interfere with data processing of a cloud, and ensure efficiency of data processing. The first whitelist may be a list formulated by a device manufacturer, and the product types in the first whitelist may be types of devices communicating based on the same data transfer protocol.
For example, a first device of a category may receive a broadcast from a bluetooth device of another category, which is discarded by the first device because the product type of the other category is not in the first whitelist of the first device.
In some embodiments, after said checking whether the product type of the second device in the bluetooth data is in the first whitelist, the method further comprises:
if the device identifier is in the first white list, checking whether the device identifier of the second device is in a second white list of the first device, wherein the second white list is used for recording the device identifier which is interconnected with the first device;
discarding the Bluetooth data if the Bluetooth data is not in the second white list;
and if the first data packet is in the second white list, generating the first data packet with the preset data format.
In this embodiment, the bluetooth data further includes a device identifier of the second device, and the first device may further verify the bluetooth data, so that a user may manage the device for data transmission through the second whitelist. The user may manage the second whitelist of the first device, e.g., delete, add device identification, through an application associated with the first device. For example, a device in a home environment may receive a broadcast from a neighboring peer device, or a device in one room may be interfered by a broadcast from a peer device in another room, and the user may manually manage the second whitelist in the application of the user terminal, and remove unwanted devices. The device identifier may be a device model number, a device unique code, a device identification code, or the like.
When the product type of the second device is in the first white list and the device identification is in the second white list, the first device generates a first data packet in the preset data format.
In some embodiments, the generating the first data packet in the preset data format includes:
judging the broadcasting type of the Bluetooth data according to the identification of the Bluetooth data, and generating a first data packet with a preset data format in response to determining that the broadcasting type of the Bluetooth data is state type broadcasting.
When the second device transmits bluetooth data in a bluetooth broadcast manner, broadcast types of bluetooth data are generally classified into two types: one is request-like broadcasting, which will always be broadcast if no response is requested, such as: requesting Wi-Fi networking broadcasting, broadcasting once every 5S, and broadcasting all the time if networking is unsuccessful; one is a status-like broadcast, which is transmitted once at intervals, repeatedly transmitted a plurality of times, such as: the reminder broadcast is sent every 1S for 3 times continuously. The state type broadcast carries state information of the second device, so that the state information needs to be uploaded to the cloud as a record, and the request type broadcast generally does not need to be uploaded to the cloud, so that the first device can process Bluetooth data differently according to different broadcasting types of the Bluetooth data, and processing efficiency is improved.
For example, when the second device broadcasts bluetooth data, the broadcast format of the attribute part of the data packet is shown in fig. 4, the broadcast type is identified as 0 time representing state type broadcast, the broadcast type is identified as 1 time representing request type broadcast, and when it is determined that the broadcast type of the bluetooth data is state type broadcast, the first device generates a first data packet with a preset data format to mount the bluetooth data to the extended attribute data of its own data packet.
In addition, after the bluetooth data is received, whether the device identifier of the second device in the bluetooth data is in the first white list can be checked first, whether the device identifier of the second device is in the second white list of the first device is checked, then the broadcast type of the bluetooth data is judged, in order to avoid repeated broadcast reception, the bluetooth data can be thrown out if the checksum in the bluetooth data is consistent with the checksum of the last received bluetooth data, otherwise, the first data packet with the preset data format is received and generated. The checksum is calculated according to information except the time stamp in the Bluetooth data, and the checksum of the repeatedly transmitted Bluetooth data is the same.
In some embodiments, the method further comprises:
and transmitting request response information through Bluetooth in response to determining that the broadcasting type of the Bluetooth data is request type broadcasting.
For request broadcasting, the cloud end is not required to be uploaded for processing, processing load of the cloud end is reduced, and when the request broadcasting meets verification conditions of the first white list and the second white list, request response information is fed back through Bluetooth, for example, when the second equipment requests Wi-Fi networking broadcasting is received, networking allowing information is fed back, the second equipment is prevented from being in a broadcasting state all the time, and the first equipment is occupied for subscribing and receiving data channels of Bluetooth broadcasting of other second equipment.
As shown in fig. 5, fig. 5 is a block diagram of a data transmission apparatus according to at least one embodiment of the present disclosure, applied to a first device in a data transmission system, where the system includes the first device, at least one second device, and a cloud server, the first device has a Wi-Fi module and a bluetooth module, the second device includes the bluetooth module, and the apparatus includes:
the data generating module 51 is configured to generate a first data packet in a preset data format after acquiring bluetooth data sent by the second device through bluetooth broadcast, where the preset data format includes a first data format describing attribute data of the second device and a second data format describing extended attribute data, and the extended attribute data includes the bluetooth data;
the data uploading module 52 is configured to transmit the first data packet to a cloud server through Wi-Fi communication, so that the cloud server issues a control instruction by analyzing the first data packet.
In some optional embodiments, the first data format is a Wi-Fi data format, and the data generating module 51 is specifically configured to, when configured to generate the first data packet in the preset data format:
and converting the Bluetooth data from a Bluetooth data format into the second data format, and adding the Bluetooth data into a Wi-Fi data format containing the attribute data of the first equipment to obtain a first data packet with a preset data format.
In some alternative embodiments, after the acquiring bluetooth data sent by the second device through bluetooth broadcast, the data generating module 51 is further configured to:
checking whether the product type of the second device in the Bluetooth data is in a first white list or not, wherein the first white list is used for recording the product type supporting interconnection with the first device;
and discarding the Bluetooth data if the Bluetooth data is not in the first white list.
In some alternative embodiments, after said checking whether the product type of the second device in the bluetooth data is in the first whitelist, the data generating module 51 is further configured to:
if the device identifier is in the first white list, checking whether the device identifier of the second device is in a second white list of the first device, wherein the second white list is used for recording the device identifier which allows the user to interconnect with the first device;
discarding the Bluetooth data if the Bluetooth data is not in the second white list;
and if the first data packet is in the second white list, generating the first data packet with the preset data format.
In some optional embodiments, the data generating module 51, when configured to generate the first data packet in the preset data format, is specifically configured to:
judging the broadcasting type of the Bluetooth data according to the identification of the Bluetooth data, and generating a first data packet with a preset data format in response to determining that the broadcasting type of the Bluetooth data is state type broadcasting.
In some alternative embodiments, as shown in fig. 6, the apparatus further comprises: a bluetooth transmission module 53 for:
and transmitting request response information through Bluetooth in response to determining that the broadcasting type of the Bluetooth data is request type broadcasting.
In some optional embodiments, the attribute data of the preset data format includes a status parameter generated by the first device; the extended attribute data in the preset data format comprises at least one of the following: the device identification of the second device, the product type of the second device, the device model of the second device, the sensor attribute name of the second device, the sensor attribute type of the second device, the sensor attribute value of the second device.
The implementation process of the functions and roles of each module in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
The embodiment of the specification also provides a data transmission method, which is applied to a data transmission system, wherein the system comprises a first device, at least one second device and a cloud server, the first device is provided with a Wi-Fi module and a Bluetooth module, the second device comprises the Bluetooth module, and the method comprises the following steps:
any second device transmits Bluetooth data through Bluetooth broadcasting;
after the first device obtains Bluetooth data sent by the second device through Bluetooth broadcasting, a first data packet in a preset data format is generated, the preset data format comprises a first data format describing self attribute data and a second data format describing extended attribute data, the extended attribute data comprises the Bluetooth data, and the first data packet is transmitted to a cloud server through Wi-Fi communication;
after the cloud server receives and analyzes the first data packet, responding to the analyzed Bluetooth data to trigger a control flow, and issuing a control instruction to the first device associated with the first data packet;
and after the first equipment receives the control instruction, executing the control instruction.
The embodiment of the specification also provides a data transmission system, which comprises a first device, at least one second device and a cloud server, wherein the first device is provided with a Wi-Fi module and a Bluetooth module, and the second device comprises the Bluetooth module; a schematic diagram of interaction of the first device, the second device and the cloud server in the system is shown in FIG. 7.
Wherein, any one of the second devices transmits Bluetooth data through Bluetooth broadcasting;
the first device generates a first data packet with a preset data format after acquiring Bluetooth data sent by the second device through Bluetooth broadcasting, wherein the preset data format comprises a first data format describing self attribute data and a second data format describing extended attribute data, the extended attribute data comprises the Bluetooth data, and the first data packet is transmitted to a cloud server through Wi-Fi communication; executing the control instruction after receiving the control instruction;
and after receiving and analyzing the first data packet, the cloud server responds to the analyzed Bluetooth data to trigger a control flow and issues a control instruction to the first device associated with the first data packet.
The implementation process of the functions and roles of each device in the system is specifically shown in the implementation process of the corresponding steps in the method, and will not be described in detail herein.
The embodiment of the present disclosure further provides an electronic device, as shown in fig. 8, where the electronic device includes a memory 81 and a processor 82, where the memory 81 is configured to store computer instructions that can be executed by the processor, and the processor 82 is configured to implement the data transmission method described in any embodiment of the present disclosure when executing the computer instructions.
The embodiments of the present specification also provide a computer program product comprising a computer program/instruction which, when executed by a processor, implements the data transmission method of any of the embodiments of the present specification.
The embodiments of the present specification also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the data transmission method according to any of the embodiments of the present specification.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present description. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification that follow, in general, the principles of the specification and including such
Common sense or conventional technical means in the technical field not applied for in the specification. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It is to be understood that the present description is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The foregoing description of the preferred embodiments is provided for the purpose of illustration only, and is not intended to limit the scope of the disclosure, since any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.
Claims (12)
1. A method of data transmission, the method comprising:
after acquiring Bluetooth data sent by a second device through Bluetooth broadcasting, a first device takes the Bluetooth data as extended attribute data of the first device, and generates a first data packet with a preset data format according to self attribute data of the first device and the extended attribute data, wherein the preset data format comprises a first data format describing the self attribute data and a second data format describing the extended attribute data;
and transmitting the first data packet to a cloud server through Wi-Fi communication, so that the cloud server analyzes the first data packet, triggers a control flow in response to the analyzed extended attribute data, and sends a control instruction to first equipment associated with the first data packet, so that the first equipment executes the control instruction.
2. The method of claim 1, wherein the first data format is a Wi-Fi data format, and wherein the generating the first data packet in the preset data format comprises:
and converting the Bluetooth data from a Bluetooth data format into the second data format, and adding the Bluetooth data into a Wi-Fi data format containing the attribute data of the first equipment to obtain a first data packet with a preset data format.
3. The method of claim 1, wherein after the acquiring bluetooth data transmitted by the second device via bluetooth broadcast, the method further comprises:
checking whether the product type of the second device in the Bluetooth data is in a first white list or not, wherein the first white list is used for recording the product type supporting interconnection with the first device;
and discarding the Bluetooth data if the Bluetooth data is not in the first white list.
4. A method according to claim 3, wherein after said checking whether the product type of the second device in said bluetooth data is in the first whitelist, the method further comprises:
if the device identifier is in the first white list, checking whether the device identifier of the second device is in a second white list of the first device, wherein the second white list is used for recording the device identifier which is interconnected with the first device;
discarding the Bluetooth data if the Bluetooth data is not in the second white list;
and if the first data packet is in the second white list, generating the first data packet with the preset data format.
5. The method of claim 1, wherein generating the first data packet in the predetermined data format comprises:
judging the broadcasting type of the Bluetooth data according to the identification of the Bluetooth data, and generating a first data packet with a preset data format in response to determining that the broadcasting type of the Bluetooth data is state type broadcasting.
6. The method of claim 5, wherein the method further comprises:
and transmitting request response information through Bluetooth in response to determining that the broadcasting type of the Bluetooth data is request type broadcasting.
7. The method according to any one of claims 1 to 6, wherein the self-attribute data in the preset data format includes a status parameter generated by the first device; the extended attribute data in the preset data format comprises at least one of the following: the device identification of the second device, the product type of the second device, the device model of the second device, the sensor attribute name of the second device, the sensor attribute type of the second device, the sensor attribute value of the second device.
8. A data transmission apparatus, the apparatus comprising:
the data generation module is used for acquiring Bluetooth data sent by a second device through Bluetooth broadcasting, taking the Bluetooth data as extended attribute data of a first device, and generating a first data packet with a preset data format according to self attribute data of the first device and the extended attribute data, wherein the preset data format comprises a first data format describing the self attribute data and a second data format describing the extended attribute data;
the data uploading module is used for transmitting the first data packet to a cloud server through Wi-Fi communication, so that the cloud server analyzes the first data packet, responding to the analyzed extended attribute data to trigger a control flow, and sending a control instruction to first equipment associated with the first data packet, so that the first equipment executes the control instruction.
9. A data transmission method, applied to a data transmission system, the system including a first device, at least one second device, and a cloud server, the method comprising:
any second device transmits Bluetooth data through Bluetooth broadcasting;
after the first device obtains Bluetooth data sent by the second device through Bluetooth broadcasting, the Bluetooth data is used as extended attribute data of the first device, a first data packet of a preset data format is generated according to self attribute data of the first device and the extended attribute data, the preset data format comprises a first data format describing the self attribute data and a second data format describing the extended attribute data, the extended attribute data comprises the Bluetooth data, and the first data packet is transmitted to a cloud server through Wi-Fi communication;
after the cloud server receives and analyzes the first data packet, responding to the first data packet to analyze the first data packet, responding to the analyzed extended attribute data to trigger a control flow, and sending a control instruction to first equipment associated with the first data packet;
and after the first equipment receives the control instruction, executing the control instruction.
10. A data transmission system is characterized in that the system comprises a first device, at least one second device and a cloud server, wherein,
any one of the second devices transmits Bluetooth data through Bluetooth broadcasting;
the first device acquires Bluetooth data sent by the second device through Bluetooth broadcasting, takes the Bluetooth data as extended attribute data of the first device, generates a first data packet with a preset data format according to self attribute data of the first device and the extended attribute data, wherein the preset data format comprises a first data format describing the self attribute data and a second data format describing the extended attribute data, the extended attribute data comprises the Bluetooth data, and transmits the first data packet to a cloud server through Wi-Fi communication; executing the control instruction after receiving the control instruction;
and after receiving and analyzing the first data packet, the cloud server analyzes the first data packet, triggers a control flow in response to the analyzed extended attribute data, and sends a control instruction to first equipment associated with the first data packet.
11. An electronic device comprising a memory for storing computer instructions executable on the processor for implementing the method of any one of claims 1 to 7 when the computer instructions are executed.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211534692.9A CN116266845B (en) | 2022-11-29 | 2022-11-29 | Data transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211534692.9A CN116266845B (en) | 2022-11-29 | 2022-11-29 | Data transmission method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116266845A CN116266845A (en) | 2023-06-20 |
CN116266845B true CN116266845B (en) | 2024-02-13 |
Family
ID=86744294
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211534692.9A Active CN116266845B (en) | 2022-11-29 | 2022-11-29 | Data transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116266845B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106658388A (en) * | 2017-03-16 | 2017-05-10 | 浙江蚂蚁精密科技有限公司 | Bluetooth gateway |
CN108337324A (en) * | 2018-03-21 | 2018-07-27 | 合肥工业大学 | A kind of card insertion intelligent cloud computing central processing unit system and its data processing method |
CN109428911A (en) * | 2017-08-24 | 2019-03-05 | 阿里巴巴集团控股有限公司 | Apparatus control method, device, terminal device and operating system |
CN109905450A (en) * | 2017-12-11 | 2019-06-18 | 阿里巴巴集团控股有限公司 | Communication between devices method, apparatus, equipment and storage medium |
CN110662250A (en) * | 2019-11-29 | 2020-01-07 | 武汉慧联无限科技有限公司 | Information processing method, related device and storage medium |
CN110830333A (en) * | 2018-08-09 | 2020-02-21 | 中兴通讯股份有限公司 | Intelligent household equipment access authentication method, device, gateway and storage medium |
CN111464955A (en) * | 2020-03-06 | 2020-07-28 | 珠海格力电器股份有限公司 | Fault reporting method, device, terminal and computer readable medium |
CN112087441A (en) * | 2020-09-03 | 2020-12-15 | 郑州信大先进技术研究院 | Multi-protocol communication method, intelligent home gateway and multi-protocol communication system |
CN112726107A (en) * | 2020-12-18 | 2021-04-30 | 青岛海尔洗衣机有限公司 | Clothes treatment equipment and control method thereof |
CN113098988A (en) * | 2019-12-23 | 2021-07-09 | 中国电信股份有限公司 | Data transmission method and data transmission system |
CN114711789A (en) * | 2022-04-20 | 2022-07-08 | 苏州赫米兹健康科技有限公司 | Multi-electrode brain wave detection device for Bluetooth gateway networking |
CN115150795A (en) * | 2021-03-30 | 2022-10-04 | 中国移动通信有限公司研究院 | Information filtering method, bluetooth antenna and Internet of things data platform |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11564074B2 (en) * | 2020-06-30 | 2023-01-24 | Arris Enterprises Llc | GAP and GATT adaptation protocol over internet protocol |
-
2022
- 2022-11-29 CN CN202211534692.9A patent/CN116266845B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106658388A (en) * | 2017-03-16 | 2017-05-10 | 浙江蚂蚁精密科技有限公司 | Bluetooth gateway |
CN109428911A (en) * | 2017-08-24 | 2019-03-05 | 阿里巴巴集团控股有限公司 | Apparatus control method, device, terminal device and operating system |
CN109905450A (en) * | 2017-12-11 | 2019-06-18 | 阿里巴巴集团控股有限公司 | Communication between devices method, apparatus, equipment and storage medium |
CN108337324A (en) * | 2018-03-21 | 2018-07-27 | 合肥工业大学 | A kind of card insertion intelligent cloud computing central processing unit system and its data processing method |
CN110830333A (en) * | 2018-08-09 | 2020-02-21 | 中兴通讯股份有限公司 | Intelligent household equipment access authentication method, device, gateway and storage medium |
CN110662250A (en) * | 2019-11-29 | 2020-01-07 | 武汉慧联无限科技有限公司 | Information processing method, related device and storage medium |
CN113098988A (en) * | 2019-12-23 | 2021-07-09 | 中国电信股份有限公司 | Data transmission method and data transmission system |
CN111464955A (en) * | 2020-03-06 | 2020-07-28 | 珠海格力电器股份有限公司 | Fault reporting method, device, terminal and computer readable medium |
CN112087441A (en) * | 2020-09-03 | 2020-12-15 | 郑州信大先进技术研究院 | Multi-protocol communication method, intelligent home gateway and multi-protocol communication system |
CN112726107A (en) * | 2020-12-18 | 2021-04-30 | 青岛海尔洗衣机有限公司 | Clothes treatment equipment and control method thereof |
CN115150795A (en) * | 2021-03-30 | 2022-10-04 | 中国移动通信有限公司研究院 | Information filtering method, bluetooth antenna and Internet of things data platform |
CN114711789A (en) * | 2022-04-20 | 2022-07-08 | 苏州赫米兹健康科技有限公司 | Multi-electrode brain wave detection device for Bluetooth gateway networking |
Also Published As
Publication number | Publication date |
---|---|
CN116266845A (en) | 2023-06-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8502640B2 (en) | System and method for transmitting and receiving information on a neighborhood area network | |
US20130159490A1 (en) | Method and apparatus for smart home service based on cloud | |
US20070299956A1 (en) | Sensor network system, gateway node, and method for relaying data of sensor network system | |
US20140229433A1 (en) | Home appliance information accumulation server | |
KR101363115B1 (en) | Smart home service system based cloud and method thereof | |
US11463319B2 (en) | System and method for the collection, generation, and distribution of synthetic metrics for computer system management | |
CN112073471A (en) | Device control method and apparatus, storage medium, and electronic apparatus | |
KR101881427B1 (en) | Information processing method in m2m and apparatus | |
CN114938365B (en) | Function module updating method and device, storage medium and electronic device | |
CN110445824B (en) | NB-IoT data reporting method, device, system and computer readable storage medium | |
CN111736938B (en) | Information display method and device, storage medium and electronic device | |
CN113196721B (en) | Method and device for discovering Internet of things equipment and terminal equipment | |
CN116266845B (en) | Data transmission method and device | |
KR102000199B1 (en) | Method and Server Apparatus for Providing Internet of Things Platform Service | |
CN112416618A (en) | Application layer data transmission method and device, storage medium and electronic device | |
CN116266905B (en) | Data processing method | |
JP2013162219A (en) | Communication device, communication system, communication method, and communication program | |
EP3929670A1 (en) | Method and apparatus for broadcasting state of household appliance, and device | |
WO2020264079A1 (en) | A system and method for the collection, generation, and distribution of synthetic metrics for computer system management | |
US9876850B2 (en) | Gateway-facilitated communications for resource-constrained devices | |
CN112738291B (en) | Resource management method, device, system, electronic equipment and storage medium | |
WO2016098321A1 (en) | Equipment management device, equipment management system and equipment management method | |
CN110971461B (en) | Sensor node configuration method and system based on Internet of things | |
JP7381218B2 (en) | Product management system and product management method | |
CN116074349A (en) | Equipment access plug-in compatible system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |