CN115499356B - Data sending method, device, system, equipment and storage medium - Google Patents

Data sending method, device, system, equipment and storage medium Download PDF

Info

Publication number
CN115499356B
CN115499356B CN202211452605.5A CN202211452605A CN115499356B CN 115499356 B CN115499356 B CN 115499356B CN 202211452605 A CN202211452605 A CN 202211452605A CN 115499356 B CN115499356 B CN 115499356B
Authority
CN
China
Prior art keywords
data
time
grade
sending
internet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211452605.5A
Other languages
Chinese (zh)
Other versions
CN115499356A (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.)
Shenzhen Haizhichuang Technology Co ltd
Original Assignee
Shenzhen Haizhichuang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Haizhichuang Technology Co ltd filed Critical Shenzhen Haizhichuang Technology Co ltd
Priority to CN202211452605.5A priority Critical patent/CN115499356B/en
Publication of CN115499356A publication Critical patent/CN115499356A/en
Application granted granted Critical
Publication of CN115499356B publication Critical patent/CN115499356B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a data transmission method, a device, a system, equipment and a storage medium, wherein the method comprises the following steps: sending a first test packet to the Internet of things platform every a first preset time interval, and recording first sending time corresponding to the first test packet; receiving a second test packet and a third test packet which are sent by the Internet of things platform based on the first test packet, and recording first receiving time corresponding to the second test packet; the second test packet carries a second receiving time, and the third test packet carries a second sending time; further, determining a network quality level based on the first sending time, the first receiving time, the second sending time and the second receiving time; and sending the target data to the Internet of things platform according to the network quality grade and the data grade corresponding to the target data. In the implementation process, a corresponding data sending strategy is formulated according to the actual network quality of the Internet of things platform, and the efficiency of data interaction between the Internet of things gateway and the Internet of things platform is improved.

Description

Data sending method, device, system, equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data sending method, an apparatus, a system, a device, and a storage medium.
Background
In the technical field of the internet of things, the internet of things gateway sends data to the internet of things platform, and data interaction between the internet of things gateway and the internet of things platform is realized. However, a large amount of network traffic is occupied in the data interaction process of the internet of things gateway and the internet of things platform, and under the condition of poor network quality, a network congestion phenomenon easily occurs, so that the efficiency of data interaction between the internet of things gateway and the internet of things platform is reduced.
Disclosure of Invention
The invention mainly aims to provide a data sending method, a data sending device, a data sending system, data sending equipment and a storage medium, and aims to solve the technical problem that the efficiency of data interaction between an internet of things gateway and an internet of things platform is low.
In order to achieve the above object, the present invention provides a data transmission method, including:
sending a first test packet to the Internet of things platform every interval of a first preset duration, and recording first sending time corresponding to the first test packet;
receiving a second test packet and a third test packet which are sent by the Internet of things platform based on the first test packet, and recording first receiving time corresponding to the second test packet; the second test packet carries second receiving time, the second receiving time is the time when the platform of the internet of things receives the first test packet, the third test packet carries second sending time, and the second sending time is the time when the platform of the internet of things sends the second test packet;
determining a network quality level based on the first sending time, the first receiving time, the second sending time, and the second receiving time;
and sending the target data to the Internet of things platform based on the network quality grade and the data grade corresponding to the target data.
In addition, to achieve the above object, the present invention also provides a data transmission apparatus, comprising:
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sending a first test packet to an Internet of things platform every a first preset time interval and recording first sending time corresponding to the first test packet;
the receiving module is used for receiving a second test packet and a third test packet which are sent by the Internet of things platform based on the first test packet and recording first receiving time corresponding to the second test packet; the second test packet carries second receiving time, the second receiving time is the time when the platform of the internet of things receives the first test packet, the third test packet carries second sending time, and the second sending time is the time when the platform of the internet of things sends the second test packet;
a first determining module, configured to determine a network quality level based on the first sending time, the first receiving time, the second sending time, and the second receiving time;
and the second sending module is used for sending the target data to the Internet of things platform based on the network quality grade and the data grade corresponding to the target data.
In addition, in order to achieve the above object, the present invention further provides a data transmission system, which includes a data transmission device and an internet of things platform;
the data sending device is used for sending a first test packet to the Internet of things platform every first preset time interval and recording first sending time corresponding to the first test packet;
the Internet of things platform is used for sending a second test packet and a third test packet based on the first test packet to the data sending device;
the data sending device is used for receiving a second test packet and a third test packet sent by the Internet of things platform based on the first test packet and recording first receiving time corresponding to the second test packet; the second test packet carries second receiving time, the second receiving time is the time when the platform of the internet of things receives the first test packet, the third test packet carries second sending time, and the second sending time is the time when the platform of the internet of things sends the second test packet;
determining a network quality level based on the first sending time, the first receiving time, the second sending time, and the second receiving time;
and sending the target data to the Internet of things platform based on the network quality grade and the data grade corresponding to the target data.
In addition, to achieve the above object, the present invention further provides an electronic device, which includes a memory, a processor, and a program or an instruction stored in the memory and executable on the processor, wherein the processor executes the program or the instruction to implement the steps of the data transmission method.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a data transmission program which, when executed by a processor, realizes the steps of the data transmission method as described above.
The invention provides a data transmission method, a device, a system, equipment and a storage medium, wherein the method comprises the following steps: sending a first test packet to the Internet of things platform every a first preset time interval, and recording first sending time corresponding to the first test packet; receiving a second test packet and a third test packet which are sent by the Internet of things platform based on the first test packet, and recording first receiving time corresponding to the second test packet; the second test packet carries second receiving time, the second receiving time is the time when the Internet of things platform receives the first test packet, the third test packet carries second sending time, and the second sending time is the time when the Internet of things platform sends the second test packet; further, determining a network quality level based on the first sending time, the first receiving time, the second sending time and the second receiving time; and sending the target data to the Internet of things platform according to the network quality grade and the data grade corresponding to the target data. In the implementation process, a corresponding data sending strategy is formulated according to the actual network quality of the Internet of things platform, so that the phenomenon of network congestion in the process of sending data to the Internet of things platform is avoided, and the efficiency of data interaction between the Internet of things gateway and the Internet of things platform is improved.
Drawings
FIG. 1 is a schematic diagram of an apparatus in a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating an application of a data transmission method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data transmission apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data transmission system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal is a mobile device, and the terminal can also be other terminal devices with a storage function.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and optionally the user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001 described previously.
Optionally, the terminal may further include a camera, a Wi-Fi module, and the like, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 mainly includes an input unit such as a keyboard including a wireless keyboard and a wired keyboard, and is used to connect to the client and perform data communication with the client; and the processor 1001 may be configured to call the data transmission program stored in the memory 1005 and perform the following operations:
sending a first test packet to an Internet of things platform every a first preset time interval, and recording first sending time corresponding to the first test packet;
receiving a second test packet and a third test packet which are sent by the Internet of things platform based on the first test packet, and recording first receiving time corresponding to the second test packet;
determining a network quality level based on the first sending time, the first receiving time, the second sending time, and the second receiving time;
and sending the target data to the Internet of things platform based on the network quality grade and the data grade corresponding to the target data.
Further, the processor 1001 may call the data transmission program stored in the memory 1005, and further perform the following operations:
determining a first target time based on the first sending time, the first receiving time, the second sending time and the second receiving time;
and determining the network quality grade according to the first target time.
Further, the processor 1001 may call the data transmission program stored in the memory 1005, and further perform the following operations:
and determining the sum value between the second target time and the third target time as the first target time.
Further, the processor 1001 may call the data transmission program stored in the memory 1005, and further perform the following operations:
and inquiring the first target time in a preset first mapping table, and determining the network quality level associated with the first target time.
Further, the processor 1001 may call the data transmission program stored in the memory 1005, and further perform the following operations:
acquiring a data identifier corresponding to the target data;
and querying the data identifier in a preset second mapping table, and determining the data grade corresponding to the target data.
Further, the processor 1001 may call the data transmission program stored in the memory 1005, and further perform the following operations:
under the condition that the network quality grade is a first quality grade, the target data are sent to the Internet of things platform in real time;
under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a first data grade, the target data is sent to the Internet of things platform in real time;
and sending the target data to the Internet of things platform at intervals of a second preset time length under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a second data grade or a third data grade.
The specific embodiment of the terminal is substantially the same as the following embodiments of the data transmission method, and is not described herein again.
The invention provides a data transmission method. Referring to fig. 2, fig. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present invention. The data transmission method provided by the embodiment of the invention can be applied to a data transmission device, and the technical scheme is explained by taking the data transmission device as an internet of things gateway as an example.
The data transmission method provided by the embodiment of the invention comprises the following steps:
s110, sending a first test packet to the Internet of things platform at intervals of a first preset duration, and recording first sending time corresponding to the first test packet.
The first test packet is a network quality test packet. In this step, the internet of things gateway sends a first test packet to the internet of things platform every first preset time interval, and records a first sending time corresponding to the first test packet, optionally, the first preset time interval is 1 minute.
And S120, receiving a second test packet and a third test packet which are sent by the Internet of things platform based on the first test packet, and recording first receiving time corresponding to the second test packet.
For convenience of understanding, referring to fig. 3, as shown in fig. 3, after receiving a first test packet, the platform of the internet of things records a second receiving time of the first test packet, and sends a second test packet to the gateway of the internet of things, where the second test packet carries the second receiving time. And the gateway of the Internet of things records the first receiving time of the second test packet when receiving the second test packet. And after the Internet of things platform sends the second test packet, sending a third test packet to the Internet of things gateway, wherein the third test packet carries second sending time for the Internet of things platform to send the second test packet.
In summary, the internet of things gateway records the first sending time, the first receiving time, the second sending time and the second receiving time. The first sending time is the time when the gateway of the internet of things sends the first test packet, the first receiving time is the time when the gateway of the internet of things receives the second test packet, the second sending time is the time when the platform of the internet of things sends the second test packet, and the second receiving time is the time when the platform of the internet of things receives the first test packet.
S130, determining a network quality level based on the first sending time, the first receiving time, the second sending time and the second receiving time.
In this step, after the first sending time, the first receiving time, the second sending time, and the second receiving time are obtained, a network quality level may be determined based on the first sending time, the first receiving time, the second sending time, and the second receiving time, where the network quality level is used to characterize network quality between the internet of things gateway and the internet of things platform. Please refer to the following embodiments.
And S140, sending the target data to the Internet of things platform based on the network quality grade and the data grade corresponding to the target data.
The target data can be understood as data to be sent to an internet of things platform by the internet of things gateway, each target data corresponds to one data grade, and the data grades are used for representing real-time priorities of target time.
In this step, the target data may be sent to the internet of things platform based on the network quality between the internet of things gateway and the internet of things platform and the data grade corresponding to the target data, and please refer to the following embodiments in a specific technical scheme.
The invention provides a data transmission method, a device, a system, equipment and a storage medium, wherein the method comprises the following steps: sending a first test packet to the Internet of things platform every a first preset time interval, and recording first sending time corresponding to the first test packet; receiving a second test packet and a third test packet which are sent by the Internet of things platform based on the first test packet, and recording first receiving time corresponding to the second test packet; the second test packet carries second receiving time, the second receiving time is the time when the Internet of things platform receives the first test packet, the third test packet carries second sending time, and the second sending time is the time when the Internet of things platform sends the second test packet; further, determining a network quality level based on the first sending time, the first receiving time, the second sending time and the second receiving time; and sending the target data to the Internet of things platform according to the network quality grade and the data grade corresponding to the target data. In the implementation process, a corresponding data sending strategy is formulated according to the actual network quality of the Internet of things platform, so that the phenomenon of network congestion in the process of sending data to the Internet of things platform is avoided, and the efficiency of data interaction between the Internet of things gateway and the Internet of things platform is improved.
Optionally, the determining a network quality level based on the first sending time, the first receiving time, the second sending time, and the second receiving time includes:
determining a first target time based on the first sending time, the first receiving time, the second sending time and the second receiving time;
and determining the network quality grade according to the first target time.
In this embodiment, the first target time may be determined according to the first sending time, the first receiving time, the second sending time, and the second receiving time; further, the network quality grade is determined according to a first target time, wherein the first target time represents the time of one-time data interaction between the internet of things gateway and the internet of things platform.
Please refer to the following embodiments for specific technical solutions.
Optionally, the determining a first target time based on the first sending time, the first receiving time, the second sending time, and the second receiving time includes:
and determining the sum value between the second target time and the third target time as the first target time.
The second target time is a difference between the second receiving time and the first transmitting time, and the third target time is a difference between the first receiving time and the second transmitting time.
Specifically, the first target time may be determined by the following formula:
T = (R2-S1) + (R1-S2)
where T denotes a first target time, R1 denotes a first reception time, R2 denotes a second reception time, S1 denotes a first transmission time, S2 denotes a second transmission time, (R2-S1) denotes a second target time, and (R1-S2) denotes a third target time.
Optionally, the determining, according to the first target time, a network quality level includes:
and inquiring the first target time in a preset first mapping table, and determining the network quality level associated with the first target time.
In this embodiment, a first mapping table is preset, where the first mapping table stores a mapping relationship between time and a network quality level, and the network quality level associated with the first target time is determined by inputting the first target time into the first mapping table for querying.
Optionally, the network quality level may be ranked by example 1:
example 1:
determining the network quality level as T1 under the condition that the first target time is 0-99 milliseconds;
determining the network quality level as T2 under the condition that the first target time is 100-199 milliseconds;
under the condition that the first target time is 200-299 milliseconds, determining that the network quality level is T3;
in the case that the first target time is 300-399 milliseconds, determining the network quality level as T4;
in the case where the first target time is greater than or equal to 400 msec, the network quality level is determined to be T5.
It should be understood that a longer first target time indicates a poorer network quality and a higher corresponding network quality level.
In the embodiment, the network quality grade is accurately determined by presetting the first mapping table of the mapping relation between the storage time and the network quality grade, and then a data sending strategy is formulated according to the network quality grade, so that the network congestion phenomenon is avoided.
Optionally, before the target data is sent to the internet of things platform based on the network quality level and the data level corresponding to the target data, the method further includes:
acquiring a data identifier corresponding to the target data;
and querying the data identifier in a preset second mapping table, and determining the data grade corresponding to the target data.
In this embodiment, a second mapping table is preset, where the second mapping table stores mapping relationships between data identifiers and data levels, and the data identifiers are input into the second mapping table for querying, so as to determine the data levels corresponding to the target data.
Optionally, the data grade corresponding to the target data may be ranked by example 2:
example 2:
if the target data is used for representing event pushing, setting the data grade corresponding to the target data as S1; if the target data is a control instruction or a reply instruction, setting the data grade corresponding to the target data as S2;
and if the target data is event report data, setting the data grade corresponding to the target data as S3.
In this embodiment, the data level corresponding to the target data is accurately determined by presetting the second mapping table in which the mapping relationship between the data identifier and the data level is stored, and then a data sending strategy is formulated according to the data level corresponding to the target data, so that a network congestion phenomenon is avoided.
Optionally, the sending the target data to the internet of things platform based on the network quality level and a data level corresponding to the target data includes:
under the condition that the network quality grade is a first quality grade, the target data are sent to the Internet of things platform in real time;
under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a first data grade, the target data is sent to the Internet of things platform in real time;
and sending the target data to the Internet of things platform at intervals of a second preset time length under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a second data grade or a third data grade.
In this embodiment, the network quality classes include a first quality class and a second quality class, the network quality corresponding to the first quality class is higher than the network quality corresponding to the second quality class, and the data classes include a first data class, a second data class, and a third data class, where the first data class has a higher priority than the second data class, and the second data class has a higher priority than the third data class.
Under the condition, under the condition that the network quality grade is the first quality grade, target data are sent to the Internet of things platform in real time;
under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a first data grade, transmitting the target data to the Internet of things platform in real time;
and under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a second data grade or a third data grade, transmitting the target data to the Internet of things platform at intervals of a second preset time length. Optionally, the second preset time period is 1 minute, and it should be understood that the second preset time period can be set by a user.
In other embodiments, as shown in example 1 and example 2, the network quality levels include five levels T1 to T5, the data levels include three levels S1 to S3, and optionally, the setting of the data transmission policy includes the following three policies:
f1: transmitting target data in real time;
f2: transmitting target data at idle;
f3: and sending the target data at fixed time.
Under the condition that the network quality grade is T1 and the data grade corresponding to the target data is S1, the target data can be sent to the Internet of things platform by using the data sending strategy F1, namely the target data is sent in real time.
Under the condition that the network quality grade is T1 and the data grade corresponding to the target data is S2, the target data can be sent to the platform of the Internet of things by using a data sending strategy F1, namely the target data is sent in real time.
Under the condition that the network quality grade is T1 and the data grade corresponding to the target data is S3, the target data can be sent to the Internet of things platform by using the data sending strategy F1, namely the target data is sent in real time.
Under the condition that the network quality grade is T2 and the data grade corresponding to the target data is S1, the target data can be sent to the Internet of things platform by using the data sending strategy F1, namely the target data is sent in real time.
Under the condition that the network quality level is T2 and the data level corresponding to the target data is S2, the target data can be sent to the Internet of things platform by using the data sending strategy F1, namely the target data is sent in real time.
Under the condition that the network quality level is T2 and the data level corresponding to the target data is S3, the target data can be sent to the Internet of things platform by using a data sending strategy F2, namely, the target data is sent in idle time.
Under the condition that the network quality grade is T3 and the data grade corresponding to the target data is S1, the target data can be sent to the Internet of things platform by using the data sending strategy F1, namely the target data is sent in real time.
Under the condition that the network quality grade is T3 and the data grade corresponding to the target data is S2, the target data can be sent to the Internet of things platform by using the data sending strategy F2, namely, the target data is sent in idle time.
Under the condition that the network quality grade is T3 and the data grade corresponding to the target data is S3, the target data can be sent to the Internet of things platform by using a data sending strategy F2, namely, the target data is sent in idle time.
Under the condition that the network quality grade is T4 and the data grade corresponding to the target data is S1, the target data can be sent to the Internet of things platform by using the data sending strategy F1, namely the target data is sent in real time.
Under the condition that the network quality level is T4 and the data level corresponding to the target data is S2, the target data can be sent to the Internet of things platform by using the data sending strategy F2, namely, the target data is sent in idle time.
Under the condition that the network quality level is T4 and the data level corresponding to the target data is S3, the target data can be sent to the Internet of things platform by using the data sending strategy F3, namely the target data is sent at regular time.
Under the condition that the network quality grade is T5 and the data grade corresponding to the target data is S1, the target data can be sent to the platform of the Internet of things by using a data sending strategy F1, namely the target data is sent in real time.
Under the condition that the network quality grade is T5 and the data grade corresponding to the target data is S2, the target data can be sent to the Internet of things platform by using a data sending strategy F3, namely, the target data is sent in idle time.
Under the condition that the network quality grade is T5 and the data grade corresponding to the target data is S3, the target data can be sent to the Internet of things platform by using the data sending strategy F3, namely the target data is sent in idle time.
In addition, an embodiment of the present invention further provides a data transmitting apparatus, please refer to fig. 4, where fig. 4 is a schematic structural diagram of the data transmitting apparatus according to the embodiment of the present invention.
As shown in fig. 4, the data transmission device 200 includes:
the first sending module 210 is configured to send a first test packet to the internet of things platform every interval of a first preset duration, and record first sending time corresponding to the first test packet;
a receiving module 220, configured to receive a second test packet and a third test packet sent by the internet of things platform based on the first test packet, and record a first receiving time corresponding to the second test packet;
a first determining module 230, configured to determine a network quality level based on the first sending time, the first receiving time, the second sending time, and the second receiving time;
a second sending module 240, configured to send the target data to the internet of things platform based on the network quality level and a data level corresponding to the target data.
Optionally, the first determining module 230 is specifically configured to:
determining a first target time based on the first sending time, the first receiving time, the second sending time and the second receiving time;
and determining the network quality grade according to the first target time.
Optionally, the first determining module 230 is further specifically configured to:
and determining the sum value between the second target time and the third target time as the first target time.
Optionally, the first determining module 230 is further specifically configured to:
and inquiring the first target time in a preset first mapping table, and determining the network quality level associated with the first target time.
Optionally, the data sending apparatus further includes:
the acquisition module is used for acquiring a data identifier corresponding to the target data;
and the second determining module is used for inquiring the data identifier in a preset second mapping table and determining the data grade corresponding to the target data.
Optionally, the second sending module 240 is specifically configured to:
under the condition that the network quality grade is a first quality grade, the target data are sent to the Internet of things platform in real time;
under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a first data grade, the target data is sent to the Internet of things platform in real time;
and sending the target data to the Internet of things platform at intervals of a second preset time length under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a second data grade or a third data grade.
The data sending apparatus 200 is capable of implementing each process of the method embodiment of fig. 2 in the embodiment of the present invention, and can achieve the same technical effect, which is not described repeatedly herein.
In addition, an embodiment of the present invention further provides a data transmission system, please refer to fig. 5, where fig. 5 is a schematic structural diagram of the data transmission system according to the embodiment of the present invention.
As shown in fig. 5, the data transmission system 300 includes a data transmission device 310 and an internet of things platform 320;
the data sending device 310 is configured to send a first test packet to the internet of things platform every first preset time interval, and record first sending time corresponding to the first test packet;
the internet of things platform 320 is configured to send a second test packet and a third test packet based on the first test packet to the data sending apparatus;
the data sending device 310 is configured to receive a second test packet and a third test packet sent by the internet of things platform based on the first test packet, and record first receiving time corresponding to the second test packet;
determining a network quality level based on the first sending time, the first receiving time, the second sending time, and the second receiving time;
and sending the target data to the Internet of things platform based on the network quality grade and the data grade corresponding to the target data.
The data transmission system 300 can implement the processes of the method embodiment in fig. 2 in the embodiment of the present invention, and can implement the same technical effects, which are not repeated herein.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a data transmission program is stored on the computer-readable storage medium, and when executed by a processor, the cluster deployment program implements each step in the data transmission method, which is not described repeatedly herein.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the data transmission method described above, and is not described herein again.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 410, a communication interface 420, a memory 430, and a communication bus 440, where the processor 410, the communication interface 420, and the memory 430 complete mutual communication through the communication bus 440.
The memory 430 is used for storing computer programs;
the processor 410 is configured to execute the steps of the data transmission method when the computer program is executed by the processor 410 when the program stored in the memory 430 is executed.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A data transmission method, comprising:
sending a first test packet to an Internet of things platform every a first preset time interval, and recording first sending time corresponding to the first test packet;
receiving a second test packet and a third test packet which are sent by the Internet of things platform based on the first test packet, and recording first receiving time corresponding to the second test packet; the second test packet carries second receiving time, the second receiving time is the time when the platform of the internet of things receives the first test packet, the third test packet carries second sending time, and the second sending time is the time when the platform of the internet of things sends the second test packet;
determining a network quality level based on the first sending time, the first receiving time, the second sending time, and the second receiving time;
sending the target data to the Internet of things platform based on the network quality grade and the data grade corresponding to the target data;
the network quality grades comprise a first quality grade and a second quality grade, the network quality corresponding to the first quality grade is higher than the network quality corresponding to the second quality grade, the data grades comprise a first data grade, a second data grade and a third data grade, the priority of the first data grade is higher than that of the second data grade, and the priority of the second data grade is higher than that of the third data grade;
the sending the target data to the internet of things platform based on the network quality grade and the data grade corresponding to the target data comprises:
under the condition that the network quality grade is a first quality grade, the target data are sent to the Internet of things platform in real time;
under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a first data grade, the target data is sent to the Internet of things platform in real time;
and sending the target data to the Internet of things platform at intervals of a second preset time length under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a second data grade or a third data grade.
2. The method of claim 1, wherein the determining a network quality level based on the first transmit time, the first receive time, the second transmit time, and the second receive time comprises:
determining a first target time based on the first sending time, the first receiving time, the second sending time and the second receiving time;
and determining the network quality grade according to the first target time.
3. The method of claim 2, wherein determining a first target time based on the first transmit time, the first receive time, the second transmit time, and the second receive time comprises:
determining a sum of a second target time and a third target time as the first target time;
the second target time is a difference between the second receiving time and the first sending time, and the third target time is a difference between the first receiving time and the second sending time.
4. The method of claim 2, wherein determining a network quality level based on the first target time comprises:
inquiring the first target time in a preset first mapping table, and determining the network quality level associated with the first target time;
wherein the first mapping table stores a mapping relationship between time and network quality levels.
5. The method of claim 1, wherein before sending the target data to the internet of things platform based on the network quality level and a data level corresponding to the target data, the method further comprises:
acquiring a data identifier corresponding to the target data;
querying the data identifier in a preset second mapping table, and determining a data grade corresponding to the target data;
and the second mapping table stores the mapping relation between the data identification and the data grade.
6. A data transmission apparatus, comprising:
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sending a first test packet to an Internet of things platform every a first preset time interval and recording first sending time corresponding to the first test packet;
the receiving module is used for receiving a second test packet and a third test packet which are sent by the Internet of things platform based on the first test packet and recording first receiving time corresponding to the second test packet; the second test packet carries second receiving time, the second receiving time is the time when the platform of the internet of things receives the first test packet, the third test packet carries second sending time, and the second sending time is the time when the platform of the internet of things sends the second test packet;
a first determining module, configured to determine a network quality level based on the first sending time, the first receiving time, the second sending time, and the second receiving time;
the second sending module is used for sending the target data to the Internet of things platform based on the network quality grade and the data grade corresponding to the target data;
the network quality grades comprise a first quality grade and a second quality grade, the network quality corresponding to the first quality grade is higher than the network quality corresponding to the second quality grade, the data grades comprise a first data grade, a second data grade and a third data grade, the priority of the first data grade is higher than that of the second data grade, and the priority of the second data grade is higher than that of the third data grade;
the sending the target data to the internet of things platform based on the network quality level and the data level corresponding to the target data comprises:
under the condition that the network quality grade is a first quality grade, the target data are sent to the Internet of things platform in real time;
under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a first data grade, the target data is sent to the Internet of things platform in real time;
and sending the target data to the Internet of things platform at intervals of a second preset time length under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a second data grade or a third data grade.
7. A data transmission system is characterized by comprising a data transmission device and an Internet of things platform;
the data sending device is used for sending a first test packet to the Internet of things platform every first preset time interval and recording first sending time corresponding to the first test packet;
the Internet of things platform is used for sending a second test packet and a third test packet based on the first test packet to the data sending device;
the data sending device is used for receiving a second test packet and a third test packet sent by the Internet of things platform based on the first test packet and recording first receiving time corresponding to the second test packet; the second test packet carries second receiving time, the second receiving time is the time when the platform of the internet of things receives the first test packet, the third test packet carries second sending time, and the second sending time is the time when the platform of the internet of things sends the second test packet;
determining a network quality level based on the first sending time, the first receiving time, the second sending time, and the second receiving time;
sending the target data to the Internet of things platform based on the network quality grade and the data grade corresponding to the target data;
the network quality grades comprise a first quality grade and a second quality grade, the network quality corresponding to the first quality grade is higher than the network quality corresponding to the second quality grade, the data grades comprise a first data grade, a second data grade and a third data grade, the priority of the first data grade is higher than that of the second data grade, and the priority of the second data grade is higher than that of the third data grade;
the sending the target data to the internet of things platform based on the network quality level and the data level corresponding to the target data comprises:
under the condition that the network quality grade is a first quality grade, the target data are sent to the Internet of things platform in real time;
under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a first data grade, the target data is sent to the Internet of things platform in real time;
and sending the target data to the Internet of things platform at intervals of a second preset time length under the condition that the network quality grade is a second quality grade and the data grade corresponding to the target data is a second data grade or a third data grade.
8. An electronic device comprising a memory, a processor and a program or instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the data transmission method according to any one of claims 1 to 5 when executing the program or instructions.
9. A readable storage medium on which a program or instructions are stored, characterized in that the program or instructions, when executed by a processor, implement the steps of the data transmission method according to any one of claims 1 to 5.
CN202211452605.5A 2022-11-21 2022-11-21 Data sending method, device, system, equipment and storage medium Active CN115499356B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211452605.5A CN115499356B (en) 2022-11-21 2022-11-21 Data sending method, device, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211452605.5A CN115499356B (en) 2022-11-21 2022-11-21 Data sending method, device, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115499356A CN115499356A (en) 2022-12-20
CN115499356B true CN115499356B (en) 2023-03-17

Family

ID=85116241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211452605.5A Active CN115499356B (en) 2022-11-21 2022-11-21 Data sending method, device, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115499356B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114222319A (en) * 2021-12-08 2022-03-22 天翼物联科技有限公司 Data transmission method and device for terminal of Internet of things and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111787570B (en) * 2020-06-19 2023-11-03 深圳市有方科技股份有限公司 Data transmission method and device of Internet of things equipment and computer equipment
CN114095434A (en) * 2020-07-29 2022-02-25 华为技术有限公司 Method and related apparatus for controlling network congestion
CN112422452A (en) * 2020-10-26 2021-02-26 全球能源互联网研究院有限公司 Data grading processing method and device based on power Internet of things platform
CN114650592B (en) * 2020-12-21 2024-05-10 华为技术有限公司 Wireless network time delay processing method, system and access server
CN114553778A (en) * 2022-02-25 2022-05-27 杭州网易云音乐科技有限公司 Heartbeat control method and device, storage medium and electronic equipment
CN115119068B (en) * 2022-06-21 2023-07-18 广州市奥威亚电子科技有限公司 Network congestion processing method and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114222319A (en) * 2021-12-08 2022-03-22 天翼物联科技有限公司 Data transmission method and device for terminal of Internet of things and storage medium

Also Published As

Publication number Publication date
CN115499356A (en) 2022-12-20

Similar Documents

Publication Publication Date Title
CN111092877B (en) Data processing method and device, electronic equipment and storage medium
CN113141383B (en) Device information subscription method, client, server, system and storage medium
CN111581502A (en) Information notification method and device
CN110022259B (en) Message arrival rate determining method and device, data statistics server and storage medium
WO2020259551A1 (en) Method and apparatus for handling network connection fault
CN114760582B (en) Method, system, device and storage medium for selecting LMF based on response time
CN113364853A (en) Business service system, business request method and gateway equipment
CN111147310A (en) Log tracking processing method, device, server and medium
CN112118151A (en) Network speed measuring method, device, system, electronic equipment and storage medium
CN110519810B (en) Service relay switching method, terminal equipment, storage medium and device
CN111355765B (en) Network request processing and sending method and device
CN108132836B (en) Task distribution method and device and electronic equipment
CN112653736B (en) Parallel source returning method and device and electronic equipment
CN115499356B (en) Data sending method, device, system, equipment and storage medium
CN113315689B (en) Information processing method, system, electronic device and readable storage medium
CN111464618A (en) Message pushing method, device, equipment and storage medium
CN115114047A (en) Remote calling method, system, device, electronic equipment and storage medium
CN107766232B (en) Plug-in management method and device
CN109361716B (en) Method and device for acquiring IP address, terminal equipment and storage medium
CN113596105A (en) Content acquisition method, edge node and computer-readable storage medium
CN113014456A (en) Monitoring data transmission system, method, device, equipment and storage medium
CN110995890A (en) Domain name request scheduling method and device
CN114245405B (en) Equipment network distribution method, electronic equipment and storage medium
US10944658B2 (en) Method, apparatus and system for method for start-up of monitoring of monitor objects in a computer-integrated telecommunications environment
CN115277493B (en) Abnormality detection method based on polling test, electronic device and storage medium

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