CN113206875A - Data transmission method, device and storage medium - Google Patents

Data transmission method, device and storage medium Download PDF

Info

Publication number
CN113206875A
CN113206875A CN202110459471.9A CN202110459471A CN113206875A CN 113206875 A CN113206875 A CN 113206875A CN 202110459471 A CN202110459471 A CN 202110459471A CN 113206875 A CN113206875 A CN 113206875A
Authority
CN
China
Prior art keywords
data
transmission channel
internet
user side
target data
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.)
Granted
Application number
CN202110459471.9A
Other languages
Chinese (zh)
Other versions
CN113206875B (en
Inventor
钟刘旺
蓝德洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Etekcity Corp
Original Assignee
Etekcity Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Etekcity Corp filed Critical Etekcity Corp
Priority to CN202110459471.9A priority Critical patent/CN113206875B/en
Publication of CN113206875A publication Critical patent/CN113206875A/en
Application granted granted Critical
Publication of CN113206875B publication Critical patent/CN113206875B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application discloses a data transmission method, a data transmission device and a storage medium, wherein a short-distance communication channel capable of transmitting data in real time is arranged between Internet of things equipment and a user side, namely a first transmission channel, and a second transmission channel is arranged between the Internet of things equipment and a server. Through first transmission path and second transmission path for thing networking device can send same target data twice through first transmission path and second transmission path respectively, realizes the purpose of binary channels transmission, in order to reduce the influence of data loss to data integrality, simultaneously because first transmission path is the short distance communication channel, can improve data transmission's real-time.

Description

Data transmission method, device and storage medium
Technical Field
The present application relates to the field of internet of things technology, and in particular, to a data transmission method, apparatus, device, system, and storage medium.
Background
Currently, in the field of Internet of things (IoT), the related data of the Internet of things device acquired by the mobile phone user needs to pass through the server.
However, the method of acquiring data by the server has the problems of poor real-time performance and easy data loss.
Disclosure of Invention
The application mainly aims to provide a data transmission method, a data transmission device and a storage medium, and the problems that in the prior art, data transmission real-time performance between a user side and internet of things equipment is poor and data is easy to lose are solved.
In order to achieve the above object, a first aspect of the present application provides a data transmission method, an apparatus and a storage medium, where the method includes:
the method comprises the steps that target data to be transmitted are obtained by the Internet of things equipment;
the internet of things equipment utilizes a first transmission channel to send the target data to a user side, the first transmission channel is a short-distance communication channel for transmitting data between the internet of things equipment and the user side in real time, and the internet of things equipment utilizes a second transmission channel to send the target data to a server again, so that the user side can conveniently pull the data from the server and carry out deduplication processing.
Optionally, the method further comprises:
if the RSSI value of the received signal of the first transmission channel is monitored to be larger than or equal to a preset signal strength threshold value, determining a first continuous time length for which the RSSI value of the first transmission channel is kept larger than or equal to the preset signal strength threshold value;
and when the first continuous time is greater than or equal to a preset time threshold, closing the second transmission channel.
Optionally, the method further comprises:
when the first duration is greater than or equal to a preset time threshold, sending a notification message to the user side by using the first transmission channel, where the notification message is used to notify the user side that the second transmission channel is closed, and triggering the user side to close a third transmission channel for pulling the target data from the server.
Optionally, the method further comprises:
receiving a closing instruction sent by the user side, wherein the closing instruction is used for indicating the internet of things equipment to close the second transmission channel;
closing the second transmission channel.
Optionally, after obtaining the target data to be transmitted, the internet of things device further includes:
determining a priority level of the target data;
if the priority level of the target data is greater than or equal to the preset priority level, determining that the target data adopts a dual-channel transmission mode, and continuing to execute the step that the Internet of things equipment transmits the target data to a user side by using a first transmission channel, wherein the first transmission channel is a short-distance communication channel for transmitting data between the Internet of things equipment and the user side in real time, and the Internet of things equipment transmits the target data to a server again by using a second transmission channel;
and if the priority level of the target data is smaller than the preset priority level, determining that the target data adopts a single-channel transmission mode, and sending the target data to the server by using a fourth transmission channel.
In order to achieve the above object, a second aspect of the present application provides a data transmission method, including:
the method comprises the steps that a user side receives target data sent by Internet of things equipment through a first transmission channel and stores the target data, wherein the first transmission channel is a short-distance communication channel for transmitting data between the Internet of things equipment and the user side in real time;
the method comprises the steps that a pulling time length is preset at intervals, a user side pulls first data from a server, the stored data are subjected to duplicate removal processing through the pulled first data, and the first data are target data reported to the server by the Internet of things equipment through a second transmission channel within the preset pulling time length.
Optionally, the target data at least comprises a time stamp;
then the performing deduplication processing on the saved data by using the pulled first data includes:
searching stored data transmitted by the Internet of things equipment through a first transmission channel within the preset pulling duration, and determining whether second data with the same timestamp as that of the first data exists or not;
if second data with the same timestamp as the first data exists, abandoning to store the first data;
and if second data with the same time stamp as the first data does not exist, saving the first data.
Optionally, the method further comprises:
if the RSSI value of the received signal of the first transmission channel is monitored to be larger than or equal to a preset signal strength threshold value, determining a second continuous time length for which the RSSI value of the first transmission channel is kept larger than or equal to the preset signal strength threshold value;
when the second continuous duration is larger than or equal to a preset time threshold, a closing instruction is sent to the Internet of things equipment by using the first transmission channel, and the closing instruction is used for indicating the Internet of things equipment to close the second transmission channel.
Optionally, the method further comprises:
and when the second continuous time is greater than or equal to a preset time threshold, closing a third transmission channel for pulling the first data from the server.
In order to achieve the above object, a third aspect of the present application provides an internet of things device, including:
the acquisition module is used for acquiring target data to be transmitted;
the transmission module is used for transmitting the target data to a user side by using a first transmission channel, the first transmission channel is a short-distance communication channel for transmitting data between the Internet of things equipment and the user side in real time, and the Internet of things equipment transmits the target data to a server again by using a second transmission channel, so that the user side can pull the data from the server and perform deduplication processing.
In order to achieve the above object, a fourth aspect of the present application provides a ue, including:
the receiving module is used for receiving target data sent by the Internet of things equipment through a first transmission channel and storing the target data, wherein the first transmission channel is a short-distance communication channel for transmitting data between the Internet of things equipment and the user side in real time;
the pulling module is used for pulling first data from the server at intervals of preset pulling time, and the stored data are subjected to duplicate removal processing by utilizing the pulled first data, wherein the first data are target data reported to the server by utilizing a second transmission channel in the preset pulling time of the Internet of things equipment.
In order to achieve the above object, a fifth aspect of the present application provides a data transmission system, where the data transmission system includes an internet of things device, a user side, and a server, the internet of things device is configured to implement the data transmission method according to the first aspect, and the user side is configured to implement the data transmission method according to the second aspect.
To achieve the above object, a sixth aspect of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the data transmission method according to the first aspect, or causes the processor to perform the steps of the data transmission method according to the second aspect.
To achieve the above object, a fourth aspect of the present application provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the steps of the data transmission method according to the first aspect, or causes the processor to execute the steps of the data transmission method according to the second aspect.
The embodiment of the application has the following advantages or beneficial effects:
the application provides a data transmission method, wherein a short-distance communication channel capable of transmitting data in real time is arranged between an internet of things device and a user side, namely a first transmission channel, and a second transmission channel is arranged between the internet of things device and a server, after target data to be transmitted are obtained, the internet of things device can send the target data to the user side through the first transmission channel, and the internet of things device also sends the target data to the server through the second transmission channel, so that the user side can pull the data from the server and perform deduplication processing. Through the mode that sets up first transmission path and second transmission path for thing networking device can send same target data twice through first transmission path and second transmission path respectively, makes same target data can transmit through different passageways, realizes the purpose of binary channels transmission, in order to reduce the influence of data loss to data integrality, simultaneously because the first transmission path who uses is the short distance communication passageway, makes can improve data transmission's real-time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
fig. 1 is a schematic diagram of a framework of a data transmission system according to an embodiment of the present application;
FIG. 2 is a flow chart of a data transmission method in an embodiment of the present application;
FIG. 3 is a flow chart illustrating additional steps of a data transmission method according to an embodiment of the present application;
fig. 4 is another schematic flow chart of a data transmission method in the embodiment of the present application;
FIG. 5 is a flow chart illustrating another additional step of the data transmission method according to the embodiment of the present application;
fig. 6 is a schematic structural diagram of an internet of things device in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a user side in an embodiment of the present application;
fig. 8 is a block diagram of a computer device in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a block diagram of a feasible data transmission system according to the technical solution provided in the embodiment of the present application is shown, where the data transmission system includes: user side, server, and thing networking equipment.
The user side refers to a program which corresponds to the server and provides local services for the user, and the program can be installed on an intelligent terminal such as a smart phone, a tablet computer, a wearable intelligent watch and the like.
The server can be a cloud server, has the characteristics of high distribution, high virtualization and the like, and can make full use of network resources. In a feasible implementation manner, the server may provide a Message Queue Telemetry Transport (MQTT) service, a data storage service, a data service for forwarding data reported by an internet of things device, and the like, where a definition topic of the MQTT service may be set based on needs, for example, may be a "data reporting topic", a "general data reporting topic", an "important data reporting topic", or other topics.
The internet of things equipment refers to household appliances capable of being added into an internet of things system, such as an intelligent humidifier, an intelligent refrigerator, an intelligent oven, an intelligent microwave oven and the like.
Further, in order to better understand the technical solution in the embodiment of the present application, a network distribution method for the data transmission system formed by the server, the client and the internet of things device is also described below, specifically as follows:
the internet of things equipment can be connected with a network through a short-distance communication protocol, wifi and the like, so that a first transmission channel can be established between a user side and the internet of things equipment, the first transmission channel is a short-distance communication channel capable of transmitting data in real time, the internet of things equipment can be connected with a server through wifi, a second transmission channel is established, and the second transmission channel can be a real-time data transmission channel between the internet of things equipment and the server.
In a feasible implementation manner, the first transmission channel is a Bluetooth Low Energy (BLE) channel, or may be an ordinary Bluetooth channel, and it should be noted that the first transmission channel is a channel for point-to-point direct transmission, that is, the user end and the internet of things device may directly transmit data by using the first transmission channel, and do not need to forward data through other devices or sites, so that the real-time performance of data transmission is better. The first transmission channel can adopt a BLE distribution network mode, for example, the user side is in a host mode, the Internet of things equipment is in a slave mode, the user side sends a broadcast signal, and BLE connection is established with the Internet of things equipment after BLE of the Internet of things equipment is scanned to form a BLE channel, or the Internet of things equipment is in the host mode, the user side is in the slave mode, the Internet of things equipment can send the broadcast signal, and the BLE connection is established with the user side after the BLE of the user side is scanned to form the BLE channel.
In a feasible implementation manner, the second Transmission channel may be a theme of an MQTT service established based on a Transmission Control Protocol (TCP) long connection, for example, the second Transmission channel may be a "data reporting theme", "important data reporting theme", "general data reporting theme" subscribed by the internet of things device, and the internet of things device may implement data reporting by subscribing the MQTT theme of the server. It is understood that, in the embodiment of the present application, closing the second transmission channel may be understood as canceling the subscription to the related topic. It can be understood that, if the internet of things device subscribes to multiple topics at the server, there are multiple transmission channels between the internet of things device and the server.
In a feasible implementation manner, a third transmission channel may be established between the client and the server, and the third data transmission channel may be a channel established based on a Hypertext Transfer Protocol (HTTP), and may implement HTTP-based data pulling, where HTTP-based data pulling is a non-real-time data transmission mode, and may be data pulling from the server at regular time based on a certain time interval, specifically, the client sends a data pulling request to the server, and the server feeds back corresponding data to the client.
It can be understood that, in order to enable the user side, the server and the internet of things device to be in the same internet of things system, a first transmission channel can be established between the user side and the internet of things device, the user side sends wifi account information of a local area network accessed or configured by the user side to the internet of things device by using the first transmission channel, and the internet of things device accesses a corresponding internet of things system by using the wifi account information and establishes a second transmission channel.
Based on the above description, in the data transmission system, a first transmission channel is provided between the internet of things device and the user side, a second transmission channel is provided between the internet of things device and the server, and a third transmission channel is provided between the user side and the server, and further, referring to fig. 2, a schematic flow diagram of the data transmission method in the embodiment of the present invention is shown, and the data transmission method is described from the perspective of the internet of things device, and includes:
step 201, obtaining target data to be transmitted by the Internet of things equipment;
step 202, the internet of things device sends the target data to the user side through the first transmission channel, the first transmission channel is a short-distance communication channel for transmitting data between the internet of things device and the user side in real time, and the internet of things device sends the target data to the server through the second transmission channel again, so that the user side can pull the target data from the server and perform deduplication processing.
Wherein, thing networking equipment has multiple type data to thing networking equipment is the humidifier for the example, can include: the humidifier is opened and closed, and the humidifier is operated in mode data (such as sleeping, manual and automatic), and is operated in gear data, abnormal water shortage prompt data, target humidity of a user, cleaning reminding switch data, equipment model, MAC address, wifi setting and the like. It can be understood that the target data to be transmitted may be any data of the internet of things device, or the target data may be data of a designated level, specifically, the data of the internet of things device may be divided according to a preset rule, and in a feasible implementation manner, taking the humidifier as an example, the data of the humidifier may be divided into 3 priorities according to the following rule, as follows:
Figure BDA0003041701860000081
in a feasible implementation manner, different transmission modes can be selected based on the priority level of the target data, and specifically, the priority level of the target data of the internet of things device can be determined first; the method can use a dividing mode similar to the table, determine the priority level of the target data by using the data performance of the Internet of things equipment and the requirement on real-time performance, determine the relation between the priority level of the target data and the preset priority level, and determine that the target data adopts a dual-channel transmission mode if the priority level of the target data is greater than or equal to the preset priority level; and if the priority level of the target data is less than the preset priority level, determining that the target data adopts a single-channel transmission mode.
For example: if the preset priority is in the priority, when the priority of the target data is high or medium, the priority of the target data can be determined to be greater than or equal to the preset priority, and the target data can be transmitted to the user side in a dual-channel transmission mode, namely the target data is transmitted twice by using the first transmission channel and the second transmission channel, so that the real-time performance of target data transmission is improved, and the problem caused by data loss is avoided. When the priority level of the target data is low, it may be determined that the priority level of the target data is less than the preset priority level, a single transmission channel mode may be adopted, and a fourth transmission channel may be used to transmit the target data to the server, and the client pulls the target data from the server.
Further, the above dual channel transmission mode specifically includes: the internet of things equipment can utilize a first transmission channel to send target data to a user side, and can also utilize a second transmission channel to send the same target data to a server again, so that the user side can pull the target data from the server and perform deduplication processing, the same target data is transmitted through two different channels of the first transmission channel and the second transmission channel respectively, under the condition that data is lost when one channel transmits the data, the other transmission channel can also transmit the data to the user side, the probability that the data is lost and causes problems is reduced, the first transmission channel is a real-time data transmission channel, the first data transmission channel is used, and the real-time performance of data transmission can be improved.
Furthermore, after the user side pulls the data from the server each time, the pulled data can be used for carrying out deduplication processing, and waste of resource space caused by repeated storage of the same data is avoided.
In the embodiment of the application, the target data is transmitted in a dual-channel mode, so that the influence of data loss on data integrity can be reduced, and the real-time performance of data transmission can be improved.
On the basis of the embodiment shown in fig. 2, channel selection may also be implemented on the basis of dual channels, and specifically, referring to fig. 3, a flow diagram of additional steps of the data transmission method in the embodiment of the present invention is shown, including:
step 301, monitoring whether the RSSI value of the first transmission channel is greater than or equal to a preset signal strength threshold;
step 302, if it is monitored that the RSSI value is greater than or equal to a preset signal strength threshold, determining a first continuous duration for which the RSSI value of the first transmission channel remains greater than or equal to the preset signal strength threshold;
step 303, when the first duration is greater than or equal to a preset time threshold, closing the second transmission channel.
It should be noted that, in practical application, the internet of things device may perform the monitoring action in step 301, may not perform the monitoring action in step 501, and may be set according to specific needs.
In this embodiment of the application, the internet of things device may monitor a Received Signal Strength Indication (RSSI) of the first transmission channel to determine whether channel control is required.
Specifically, the internet of things device monitors whether an RSSI value of a first transmission channel is greater than or equal to a preset signal strength threshold, and if the RSSI value is greater than or equal to the preset signal strength threshold, then counts a first duration for which the RSSI value of the first transmission channel is maintained greater than or equal to the preset signal strength threshold, for example, if the RSSI value of the first transmission channel is monitored at time a to be greater than or equal to the preset signal strength threshold, then counts a first duration for which the RSSI value of the first transmission channel is maintained greater than or equal to a preset signal emphasis threshold, and if the first duration is greater than or equal to the preset time threshold, then it indicates that the first transmission channel between the internet of things device and the user terminal is relatively stable and can transmit data only by using the first transmission channel, so the internet of things device closes a second transmission channel, so that in the case that the first transmission channel is stable, the overhead of the data reporting server can be reduced in a manner of closing the second transmission channel.
It can be understood that closing the second transmission channel may specifically be to cancel subscription of an MQTT theme corresponding to the second transmission channel, and correspondingly, if the theme subscribed by the internet of things device only includes the MQTT theme corresponding to the second transmission channel, considering that the internet of things device does not send the target data from the second transmission channel any more, the user side does not need to pull the data from the server any more, therefore, the internet of things device may further send a notification message to the user side by using the first transmission channel, where the notification message is used to notify the user side that the second transmission channel is closed, so that the user side may close the third transmission channel for pulling the target data from the server after receiving the notification message, so as to further save energy consumption of the user side.
In the embodiment of the application, the internet of things device monitors the RSSI value of the first transmission channel and counts the first continuous time that the RSSI value is greater than or equal to the preset signal strength threshold, so that the second transmission channel and the third transmission channel can be controlled to be closed under the condition that the first continuous time is greater than or equal to the preset signal strength threshold, and the expenses of the internet of things device and the user side can be saved.
It should be noted that the embodiments shown in fig. 2 and fig. 3 are technical solutions described from an internet of things device, and a data transmission method will be described from a user side, please refer to fig. 4, which is another flow diagram of the data transmission method in the embodiments of the present application, and includes:
step 401, a user side receives target data sent by the internet of things device through a first transmission channel and stores the target data;
step 402, at intervals of preset pulling duration, the user side pulls the first data from the server, and performs deduplication processing on the stored data by using the pulled first data.
In this embodiment of the application, the first transmission channel is a short-distance communication channel for transmitting data in real time between the internet of things device and the user end, and may be a BLE channel, for example. The method for pulling the data from the server by the user side is to pull the data from the server at regular time, that is, the data is pulled from the server at intervals of preset pulling time duration, and belongs to a non-real-time data transmission mode.
In this application embodiment, in order to avoid the same data to save the wasted storage space repeatedly, can carry out deduplication processing to the first data of pulling, wherein, the target data that thing networking device sent has contained the timestamp at least, then utilizes first data to carry out deduplication processing to the data that have saved, include:
a. searching data which are stored by a user side and transmitted by the Internet of things equipment through a first transmission channel within a preset pulling time length, and determining whether second data with the same timestamp as that of the first data exist or not;
b. if second data with the same time stamp as the first data exists, abandoning to store the first data;
c. if there is no second data having the same time stamp as that of the first data, the first data is held.
It should be noted that, the target data sent by the internet of things device may include, in addition to the timestamp, a Media Access Control Address (MAC) Address of the internet of things device, where the MAC Address may uniquely identify the internet of things device, and when the user pulls data from the server, the sent pull request includes the MAC Address of the internet of things device.
In this embodiment of the application, after the user side pulls the first data, data transmitted through the first transmission channel by the internet of things device that is stored at the user side within a preset pulling duration is searched, for example, a time point of the last pulling is a1, a time point of the current pulling is a2, the preset pulling duration is a2-a1, the searched data is third data transmitted through the first transmission channel within the preset pulling duration from a1 to a2, and whether second data with a timestamp that is the same as that of the first data exists in the third data is determined. If second data with the same timestamp as that of the first data exists in the third data, the first data is stored, repeated storage is not needed, at this time, the first data needs to be abandoned, if second data with the same timestamp as that of the first data does not exist in the third data, the first data is lost when being transmitted through the first data transmission channel, at this time, in order to ensure the integrity of the data, the influence of the lost data is reduced, and the first data is stored.
Further, after the foregoing deduplication processing is completed, the stored data may be further integrated to further reduce the memory space occupied by the stored data, for example, the stored fourth data in the latest one or more pull times may be integrated in the following manner: and if the minute grouping interval of the data A in the fourth data is the same as the minute grouping interval of the data B, integrating the data A and the data B, setting the time stamps of the data A and the data B as preset values in the minute grouping interval, averaging other equipment data except identification data such as MAC addresses and the like, such as induction values of equipment of the Internet of things, generating new data C, deleting the data A and the data B, and replacing the data A and the data B by using the data C to complete integration and reduce the memory space required by data storage. And the integration process is executed by the user side, so that the pressure of the server on data processing can be effectively reduced, and the integration efficiency is improved.
To better understand the integration process, the following will take the data of the humidifier as an example: if the humidifier data stored by the user side contains two data, the data are respectively:
data 1 ═ timestamp: 1616134314, MAC address of humidifier BLE 24: a1:60:8C:40:86, humidity value: 0.30 };
data 2 ═ timestamp: 1616134329, MAC address of humidifier BLE 24: a1:60:8C:40:86, humidity value 0.32 };
the two data include a timestamp, a MAC address and a humidity value, wherein the timestamp is used for indicating the time of data acquisition, the MAC address is used for identifying the humidifier, the humidity value is the acquired data, the MAC addresses of the data 1 and the data 2 are the same, and therefore, the data can be determined to be the data of the same humidifier, at this time, the timestamp can be formatted to obtain minute times 2021-03-1914: 11 and 2021-03-1914: 12, the minute time values are 14 respectively, if the minute grouping interval is one group every five minutes, the data 1 and the data 2 are both in the same minute grouping interval, namely [10, 15 ], the two data can be integrated in a manner that the timestamp is set to 2021-03-1914: 00, the MAC address is unchanged, the humidity value is averaged to be 0.31, and obtaining the integrated data.
It can be understood that the data obtained by the user side after performing deduplication processing and integration processing on the data of the internet of things device can be used for data display of the internet of things device, for example, a data curve can be generated and displayed on a display interface of the user side, so that the user can view real-time data change conditions of the internet of things device. Taking the humidifier as an example, the user at the user end may select a time range of the viewed data, which may be a latest time period or a historical time period, and the user end may obtain the data of the humidifier within the time range and draw a humidity value change curve according to a sequence of timestamps in the data.
It can be understood that, in the embodiment shown in fig. 3, it is described that the internet of things device monitors the RSSI value of the first transmission channel to determine whether the second transmission channel needs to be closed, and in another feasible implementation manner, the RSS value of the first transmission channel may also be monitored by the user end, please refer to fig. 5, which is a schematic flow chart of additional steps of the data transmission method in the embodiment of the present invention, including:
step 501, a user side monitors whether an RSSI value of a first transmission channel is greater than or equal to a preset signal strength threshold value;
step 502, if it is monitored that the RSSI value is greater than or equal to the preset signal strength threshold, determining a second continuous time length for which the RSSI value of the first transmission channel is kept greater than or equal to the preset signal strength threshold;
step 503, when the second continuous duration is greater than or equal to the preset time threshold, sending a closing instruction to the internet of things device by using the first transmission channel, where the closing instruction is used to instruct the internet of things device to close the second transmission channel.
It should be noted that, in practical applications, the user end may perform the monitoring operation in step 501, or may not perform the monitoring operation in step 501, and may be set according to specific needs.
In this embodiment of the application, the user side monitors whether the RSSI value of the first transmission channel is greater than or equal to a preset signal strength threshold, if the RSSI value is greater than or equal to the preset signal strength threshold, a second continuous duration during which the RSSI value of the first transmission channel is kept greater than or equal to the preset signal strength threshold is counted, and when the second continuous duration is greater than or equal to a preset time threshold, it is indicated that the first transmission channel is relatively stable, at this time, in order to reduce consumption of resources by dual-channel transmission, the user side may send a closing instruction to the internet of things device, where the closing instruction is used to instruct the internet of things device to close the second transmission channel, where closing the second transmission channel may specifically be to cancel subscription to an MQTT theme corresponding to the second transmission channel. In addition, considering that the user terminal cannot pull the data from the server even after the second transmission channel is closed, the user terminal may also close the third transmission channel for pulling the first data from the server.
It can be understood that, for the internet of things device, if the user terminal monitors the RSSI of the first transmission channel, the internet of things device side may further receive the closing instruction sent by the user terminal, and close the second transmission channel.
In this embodiment of the application, under the condition that it is determined that the first transmission channel is relatively stable, in order to reduce resource waste caused by dual-channel data transmission, the second transmission channel and the third transmission channel can be further closed in the above manner, so that data transmission can be performed between the internet of things device and the user side through the first transmission channel, and channel selection is realized.
It can be understood that, in the embodiment of the present application, if data of the internet of things device is classified according to priority, the target data transmitted through the dual channel may be data with a preset priority, for example, data with a high priority or data with a high priority and data with a medium priority, and for data with a low priority, the target data may not be transmitted through the first transmission channel to reduce the size of the data amount transmitted through the first transmission channel, and in the case that the internet of things device is classified according to priority, the internet of things device may subscribe to different topics on the server for data with different priorities, for example, if data needing to be transmitted through the dual channel is data with a high priority and the corresponding internet of things device subscribes to a topic of "data with a high priority" on the server, when the second transmission channel is closed, the third transmission channel may be determined to be closed only by canceling the subscription of the "data report with a high priority level", and further, it may be determined whether another transmission channel exists between the internet of things device and the server after the second transmission channel is closed, that is, whether another subscribed topic exists on the server by the internet of things device, if another subscribed topic exists, the user side may further pull data of another subscribed topic from the server, and the third transmission channel does not need to be closed, and if another subscribed topic does not exist, it is indicated that the user side does not need to pull data from the server, and it is determined that the third transmission channel may be closed.
It can be understood that, after the second transmission channel is closed, the internet of things device and/or the user side will continue to monitor the RSSI value of the first transmission channel, and if the RSSI value of the first transmission channel is monitored to be smaller than the preset signal strength threshold, the internet of things device will reestablish the second transmission channel, and report the target data using the second transmission channel, so that the user side can pull the related data from the server, thereby ensuring that the user side can obtain the target data of the internet of things device, and avoiding that the target data cannot be transmitted to the user side.
It should be noted that the technical scheme in the embodiment of the application is suitable for internet of things devices which have high requirements on real-time performance of data, such as a humidifier, an oven and the like, and the real-time performance of data can be improved and the problem of incomplete data caused by data loss can be avoided by a dual-channel target data transmission mode.
Please refer to fig. 6, which is a schematic structural diagram of an internet of things device in an embodiment of the present application, where the internet of things device includes:
an obtaining module 601, configured to obtain target data to be transmitted;
the transmission module 602 is configured to send target data to the user side through a first transmission channel, where the first transmission channel is a short-distance communication channel for transmitting data between the internet of things device and the user side in real time, and the internet of things device sends the target data to the server through a second transmission channel, so that the user side pulls the data from the server and performs deduplication processing.
Further, the internet of things device further comprises:
the first monitoring module is used for monitoring whether the RSSI value of the received signal of the first transmission channel is greater than or equal to a preset signal strength threshold value or not;
the first determination module is used for determining a first continuous time length for which the RSSI value of the first transmission channel is kept to be greater than or equal to a preset signal strength threshold if the RSSI value is monitored to be greater than or equal to the preset signal strength threshold;
and the first closing module is used for closing the second transmission channel when the first continuous time is greater than or equal to the preset time threshold.
And the sending module is used for sending a notification message to the user side by using the first transmission channel when the first continuous time is greater than or equal to the preset time threshold, wherein the notification message is used for notifying the user side that the second transmission channel is closed and triggering the user side to close a third transmission channel for pulling the target data from the server.
In addition, the internet of things device may further include:
the receiving module is used for receiving a closing instruction sent by the user side, and the closing instruction is used for indicating the Internet of things equipment to close the second transmission channel;
and the second closing module is used for closing the second transmission channel.
In this embodiment of the application, a short-distance communication channel capable of transmitting data in real time is arranged between the internet of things device and the user side, namely, a first transmission channel is arranged, a second transmission channel is arranged between the internet of things device and the server, the internet of things device can send the target data to the user side by using the first transmission channel after acquiring the target data to be transmitted, and the internet of things device also sends the target data to the server by using the second transmission channel, so that the user side can pull the data from the server and perform deduplication processing. Through the mode that sets up first transmission path and second transmission path for thing networking device can send same target data twice through first transmission path and second transmission path respectively, makes same target data can transmit through different passageways, realizes the purpose of binary channels transmission, in order to reduce the influence of data loss to data integrality, simultaneously because the first transmission path who uses is the short distance communication passageway, makes can improve data transmission's real-time.
Please refer to fig. 7, which is a schematic structural diagram of a ue in an embodiment of the present application, the ue includes:
the receiving module 701 is configured to receive target data sent by the internet of things device through a first transmission channel, and store the target data, where the first transmission channel is a short-distance communication channel for transmitting data between the internet of things device and the user side in real time;
the pulling module 702 is configured to pull first data from the server every preset pulling duration, and perform deduplication processing on the stored data by using the pulled first data, where the first data is target data reported to the server by the internet of things device through the second transmission channel within the preset pulling duration.
Further, the target data at least comprises a time stamp;
a pull module 702, comprising:
the pull searching module is used for pulling the first data from the server without an interval preset pull time, searching the stored data transmitted by the Internet of things equipment through the first transmission channel within the preset pull time, and determining whether second data with the same timestamp as that of the first data exists or not;
the abandoning module is used for abandoning and saving the first data if second data with the same time stamp as that of the first data exists;
and the storage module is used for storing the first data if second data with the same time stamp as that of the first data does not exist.
Further, the user side further comprises:
the second monitoring module is used for monitoring whether the RSSI value of the received signal of the first transmission channel is greater than or equal to a preset signal strength threshold value or not;
a second determining module, configured to determine a second continuous duration in which the RSSI value of the first transmission channel remains greater than or equal to the preset signal strength threshold if it is monitored that the RSSI value is greater than or equal to the preset signal strength threshold;
and the instruction sending module is used for sending a closing instruction to the Internet of things equipment by using the first transmission channel when the second continuous time length is greater than or equal to the preset time threshold, wherein the closing instruction is used for indicating the Internet of things equipment to close the second transmission channel.
And the channel closing module is used for closing a third transmission channel for pulling the first data from the server when the second continuous time is greater than or equal to a preset time threshold.
In an embodiment of the present application, a data transmission system is further provided, where the data transmission system includes an internet of things device in the embodiment shown in fig. 6, a user side in the embodiment shown in fig. 7, and a server.
FIG. 8 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a terminal, and may also be a server. As shown in fig. 8, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, causes the processor to carry out the steps of the above-described method embodiments. The internal memory may also store a computer program, which, when executed by the processor, causes the processor to perform the steps of the above-described method embodiments. Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is proposed, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the above-described method embodiments.
In an embodiment, a computer-readable storage medium is proposed, in which a computer program is stored which, when being executed by a processor, causes the processor to carry out the respective steps in the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of data transmission, the method comprising:
the method comprises the steps that target data to be transmitted are obtained by the Internet of things equipment;
the internet of things equipment utilizes a first transmission channel to send the target data to a user side, the first transmission channel is a short-distance communication channel for transmitting data between the internet of things equipment and the user side in real time, and the internet of things equipment utilizes a second transmission channel to send the target data to a server again, so that the user side can conveniently pull the data from the server and carry out deduplication processing.
2. The method of claim 1, further comprising:
if the RSSI value of the received signal of the first transmission channel is monitored to be larger than or equal to a preset signal strength threshold value, determining a first continuous time length for which the RSSI value of the first transmission channel is kept larger than or equal to the preset signal strength threshold value;
and when the first continuous time is greater than or equal to a preset time threshold, closing the second transmission channel.
3. The method of claim 2, further comprising:
when the first duration is greater than or equal to a preset time threshold, sending a notification message to the user side by using the first transmission channel, where the notification message is used to notify the user side that the second transmission channel is closed, and triggering the user side to close a third transmission channel for pulling the target data from the server.
4. The method of claim 1, wherein after the device of the internet of things acquires the target data to be transmitted, the method further comprises:
determining a priority level of the target data;
if the priority level of the target data is greater than or equal to the preset priority level, determining that the target data adopts a dual-channel transmission mode, and continuing to execute the step that the Internet of things equipment transmits the target data to a user side by using a first transmission channel, wherein the first transmission channel is a short-distance communication channel for transmitting data between the Internet of things equipment and the user side in real time, and the Internet of things equipment transmits the target data to a server again by using a second transmission channel;
and if the priority level of the target data is smaller than the preset priority level, determining that the target data adopts a single-channel transmission mode, and sending the target data to the server by using a fourth transmission channel.
5. A method of data transmission, the method comprising:
the method comprises the steps that a user side receives target data sent by Internet of things equipment through a first transmission channel and stores the target data, wherein the first transmission channel is a short-distance communication channel for transmitting data between the Internet of things equipment and the user side in real time;
the method comprises the steps that a pulling time length is preset at intervals, a user side pulls first data from a server, the stored data are subjected to duplicate removal processing through the pulled first data, and the first data are target data reported to the server by the Internet of things equipment through a second transmission channel within the preset pulling time length.
6. The method of claim 5, wherein the target data includes at least a timestamp;
then the performing deduplication processing on the saved data by using the pulled first data includes:
searching stored data transmitted by the Internet of things equipment through a first transmission channel within the preset pulling duration, and determining whether second data with the same timestamp as that of the first data exists or not;
if second data with the same timestamp as the first data exists, abandoning to store the first data;
and if second data with the same time stamp as the first data does not exist, saving the first data.
7. The method of claim 5, further comprising:
if the user side monitors that the RSSI value of the received signal of the first transmission channel is greater than or equal to a preset signal strength threshold value, determining a second continuous time length for which the RSSI value of the first transmission channel is kept greater than or equal to the preset signal strength threshold value;
when the second continuous duration is larger than or equal to a preset time threshold, a closing instruction is sent to the Internet of things equipment by using the first transmission channel, and the closing instruction is used for indicating the Internet of things equipment to close the second transmission channel.
8. An internet of things device, comprising:
the acquisition module is used for acquiring target data to be transmitted;
the transmission module is used for transmitting the target data to a user side by using a first transmission channel, the first transmission channel is a short-distance communication channel for transmitting data between the Internet of things equipment and the user side in real time, and the Internet of things equipment transmits the target data to a server again by using a second transmission channel, so that the user side can pull the data from the server and perform deduplication processing.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 4 or to carry out the steps of the method according to any one of claims 5 to 7.
10. A computer device comprising a memory and a processor, characterized in that the memory stores computer programs causing the processor to perform the steps of the method according to any of claims 1 to 4 or to perform the steps of the method according to any of claims 5 to 7.
CN202110459471.9A 2021-04-27 2021-04-27 Data transmission method, device and storage medium Active CN113206875B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110459471.9A CN113206875B (en) 2021-04-27 2021-04-27 Data transmission method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110459471.9A CN113206875B (en) 2021-04-27 2021-04-27 Data transmission method, device and storage medium

Publications (2)

Publication Number Publication Date
CN113206875A true CN113206875A (en) 2021-08-03
CN113206875B CN113206875B (en) 2022-09-02

Family

ID=77026862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110459471.9A Active CN113206875B (en) 2021-04-27 2021-04-27 Data transmission method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113206875B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115296935A (en) * 2022-10-08 2022-11-04 华诺网络科技有限公司 Information security data processing method and system
CN116033585A (en) * 2023-03-24 2023-04-28 深圳开鸿数字产业发展有限公司 Data transmission method, device, communication equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1679928A2 (en) * 2005-01-06 2006-07-12 Samsung Electronics Co., Ltd. Method for determining a time for performing a vertical hand-off among IP-based heterogeneous wireless access networks
CN105554831A (en) * 2016-01-28 2016-05-04 努比亚技术有限公司 Network switching device and method
CN109309924A (en) * 2017-07-26 2019-02-05 北京小米移动软件有限公司 Data transmission method and device
CN109600388A (en) * 2019-01-03 2019-04-09 腾讯科技(深圳)有限公司 Data transmission method, device, computer-readable medium and electronic equipment
CN110099403A (en) * 2019-05-17 2019-08-06 腾讯科技(深圳)有限公司 A kind of data transmission method, device, equipment and storage medium
CN112073490A (en) * 2020-08-31 2020-12-11 安徽中科美络信息技术有限公司 Driving event monitoring method and system based on Internet of things technology
WO2021022907A1 (en) * 2019-08-08 2021-02-11 中兴通讯股份有限公司 Data transmission method, apparatus, and storage medium
CN112436943A (en) * 2020-10-29 2021-03-02 南阳理工学院 Request deduplication method, device, equipment and storage medium based on big data
CN112564942A (en) * 2020-11-19 2021-03-26 深圳市晨北科技有限公司 Distribution network control method and device of Internet of things equipment, equipment and storage medium
CN112672330A (en) * 2020-12-07 2021-04-16 深圳市晨北科技有限公司 Communication method and system, device and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1679928A2 (en) * 2005-01-06 2006-07-12 Samsung Electronics Co., Ltd. Method for determining a time for performing a vertical hand-off among IP-based heterogeneous wireless access networks
CN105554831A (en) * 2016-01-28 2016-05-04 努比亚技术有限公司 Network switching device and method
CN109309924A (en) * 2017-07-26 2019-02-05 北京小米移动软件有限公司 Data transmission method and device
CN109600388A (en) * 2019-01-03 2019-04-09 腾讯科技(深圳)有限公司 Data transmission method, device, computer-readable medium and electronic equipment
CN110099403A (en) * 2019-05-17 2019-08-06 腾讯科技(深圳)有限公司 A kind of data transmission method, device, equipment and storage medium
WO2021022907A1 (en) * 2019-08-08 2021-02-11 中兴通讯股份有限公司 Data transmission method, apparatus, and storage medium
CN112073490A (en) * 2020-08-31 2020-12-11 安徽中科美络信息技术有限公司 Driving event monitoring method and system based on Internet of things technology
CN112436943A (en) * 2020-10-29 2021-03-02 南阳理工学院 Request deduplication method, device, equipment and storage medium based on big data
CN112564942A (en) * 2020-11-19 2021-03-26 深圳市晨北科技有限公司 Distribution network control method and device of Internet of things equipment, equipment and storage medium
CN112672330A (en) * 2020-12-07 2021-04-16 深圳市晨北科技有限公司 Communication method and system, device and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115296935A (en) * 2022-10-08 2022-11-04 华诺网络科技有限公司 Information security data processing method and system
CN115296935B (en) * 2022-10-08 2022-12-20 华诺网络科技有限公司 Information security data processing method and system
CN116033585A (en) * 2023-03-24 2023-04-28 深圳开鸿数字产业发展有限公司 Data transmission method, device, communication equipment and storage medium

Also Published As

Publication number Publication date
CN113206875B (en) 2022-09-02

Similar Documents

Publication Publication Date Title
US11647099B2 (en) Method and apparatus for transmitting data in IoT system, and gateway device and storage medium thereof
CN113206875B (en) Data transmission method, device and storage medium
CN111355669B (en) Method, device and system for controlling network congestion
CN112840693A (en) Efficient MICO mode management method using network analysis information in 5G mobile network system
CN109274730B (en) Internet of things system, MQTT message transmission optimization method and device
CN105208125B (en) message transmission method, device and system
CN106851799B (en) Method and device for sending heartbeat packet in long connection
EP2882163A1 (en) Method and system for scheduling a push data transmission
CN103678522B (en) A kind of data acquisition of intelligent substation metering system and conversion method
CN111585711B (en) Uplink data sending method and device of narrowband Internet of things
CN105357026B (en) A kind of resource information collection method and calculate node
CN111586876B (en) Data scheduling method and device for narrowband Internet of things
CN105637904A (en) Traffic coordination for communication sessions involving wireless terminals and server devices
CN113949417B (en) Power grid data transmission method and device based on hybrid communication
WO2013068925A2 (en) Method and apparatus for controlling wireless devices
CN114884975B (en) Service message processing method and device, storage medium and electronic device
CN103312816B (en) A kind of message distributing method and equipment
CN109495796B (en) Remote radio terminal control method and concentrator
CN113438494A (en) Data processing method and device
CN103716658A (en) Video on demand service device and method
WO2024001266A1 (en) Video stream transmission control method and apparatus, device, and medium
CN111565469B (en) Uplink real-time data transmission method and device of narrow-band Internet of things
CN113677031B (en) Terminal uplink resource scheduling method and device, computing equipment and computer storage medium
CN110300035B (en) Method, system, device and server for judging load state of storage system
CN106506434B (en) Service data transmission method and device

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