Data transmission method, device and program product

By transmitting TCP heartbeat packets of Wi-Fi links between the smart end and the device end, the smart end actively sends Bluetooth connection requests, solving the problem that the smart end cannot obtain data updates on the device end in time, and improving the reliability and efficiency of data transmission.

CN120050804BActive Publication Date: 2025-08-29ROYPOW TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510519088.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-08-29
Estimated Expiration
2045-04-24

AI Technical Summary

Technical Problem

The intelligent end cannot obtain the data update status of the device end in time, resulting in blockage of the device end, affecting the reliability and timeliness of data transmission.

Method used

The TCP heartbeat packet based on the Wi-Fi link is transmitted between the intelligent end and the device end, and the data update command is determined through the TCP heartbeat packet. The intelligent end actively sends Bluetooth connection requests and establishes a Bluetooth connection for data transmission.

Benefits of technology

It improves the reliability and timeliness of data acquisition on the smart side, reduces the chance of device blocking, and improves the efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050804B_ABST
    Figure CN120050804B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data transmission, and in particular to a data transmission method, device and program product. The method includes: transmitting a TCP heartbeat packet based on a Wi-Fi link between a smart terminal and a device terminal; the smart terminal receives a data update instruction sent by the device terminal through a TCP connection determined by the TCP heartbeat packet, and the data update instruction is generated when the device terminal detects data to be sent; according to the data update instruction, the smart terminal sends a Bluetooth connection request to the device terminal that has completed Bluetooth pairing with the smart terminal; the smart terminal receives the request response from the device terminal and establishes a Bluetooth connection according to the request response, and transmits the data to be sent according to the Bluetooth connection. The TCP connection determined by the TCP heartbeat packet allows the smart terminal to obtain the updated status more timely. By actively sending the Bluetooth connection request by the smart terminal, the probability of device terminal blocking can be reduced, and the reliability of the smart terminal in obtaining data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data transmission, and in particular to a data transmission method, device and program product. Background Art

[0002] Bluetooth Low Energy (BLE) offers extremely low power consumption and faster transmission speeds, but it also reduces the amount of data transmitted. It is commonly used in a wide range of smart electronic products that require high battery life and only require small data transfers, such as smart wearables, smart homes, and sensors. For example, in industrial and smart home applications, Bluetooth Low Energy is often used for data transmission to extend device battery life.

[0003] However, in actual use, if data on the device is updated, the smart device may not be able to promptly receive this information. While the slave device can proactively send notifications or instructions to the host via Bluetooth Low Energy (BLE), if the host doesn't respond in a timely manner, the slave device will often become blocked, preventing the host from sending data related to key request instructions, hindering the smart device from obtaining updated data in a timely and reliable manner. Summary of the Invention

[0004] In view of this, an embodiment of the present application provides a data transmission method, device and storage medium to solve the problem in the prior art that the smart terminal may not be able to promptly know that the data on the device side has been updated, which is not conducive to the smart terminal obtaining updated data in a timely and reliable manner.

[0005] A first aspect of an embodiment of the present application provides a data transmission method, the method comprising:

[0006] TCP heartbeat packets based on Wi-Fi links are transmitted between the smart terminal and the device;

[0007] The smart terminal receives the data update instruction sent by the device terminal through the TCP connection determined by the TCP heartbeat packet, and the data update instruction is generated when the device terminal detects data to be sent;

[0008] According to the data update instruction, the smart terminal sends a Bluetooth connection request to the device terminal that has completed Bluetooth pairing with the smart terminal;

[0009] The smart end receives the request response from the device end and establishes a Bluetooth connection according to the request response, and transmits the data to be sent according to the Bluetooth connection.

[0010] In combination with the first aspect, in a first possible implementation of the first aspect, the smart terminal receives the data update instruction sent by the device terminal through the TCP connection determined by the TCP heartbeat packet, including:

[0011] The intelligent terminal determines the connection status between the intelligent terminal and the device terminal through the TCP heartbeat packet;

[0012] Based on the device states of the smart terminal and the device terminal, the smart terminal serving as a TCP client receives a data update instruction sent by the device terminal serving as a TCP server terminal.

[0013] In combination with the first aspect, in a second possible implementation of the first aspect, according to the data update instruction, the smart terminal sends a Bluetooth connection request to the device terminal that has completed Bluetooth pairing with the smart terminal, including:

[0014] According to the data update instruction, the smart terminal as the Bluetooth host searches for Bluetooth connection information of the paired device terminal as the Bluetooth slave;

[0015] According to the Bluetooth connection information, the smart terminal sends a Bluetooth connection request to the device terminal.

[0016] In combination with any one of the first aspect to the second implementation manner of the first aspect, in a third possible implementation manner of the first aspect, after the smart end receives the request response from the device end and establishes a Bluetooth connection according to the request response, and transmits the data to be sent according to the Bluetooth connection, the method further includes:

[0017] After the data to be sent is sent, the Bluetooth connection is closed.

[0018] In combination with any one of the first aspect to the second implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, after the smart end receives the request response of the device end and establishes a Bluetooth connection according to the request response, the method further includes:

[0019] The intelligent terminal stops transmitting the TCP heartbeat packet to the device terminal, or the intelligent terminal reduces the frequency of transmitting the TCP heartbeat packet to the device terminal;

[0020] After the data to be sent is transmitted, the method further includes:

[0021] The intelligent end resumes the transmission of the TCP heartbeat packets between the intelligent end and the device end, or the intelligent end increases the transmission frequency of the TCP heartbeat packets between the intelligent end and the device end.

[0022] A second aspect of the embodiments of the present application provides a data transmission method, the method comprising:

[0023] The device and the smart terminal transmit a TCP heartbeat packet based on the Wi-Fi link;

[0024] When the device detects data to be sent, the device sends a data update instruction through the TCP connection determined by the TCP heartbeat packet;

[0025] The device receives the Bluetooth connection request sent by the smart terminal, and sends a request response to the smart terminal according to the Bluetooth request;

[0026] The device side establishes a Bluetooth connection according to the request response, and transmits the data to be sent according to the Bluetooth connection.

[0027] In conjunction with the second aspect, in a first possible implementation of the second aspect, transmitting a TCP heartbeat packet based on a Wi-Fi link between the device end and the smart end includes:

[0028] The device side obtains the detection data of the device side;

[0029] The device side determines the data interval to which the detection data of the device side belongs;

[0030] The device determines the frequency of sending TCP heartbeat packets between the smart terminal and the device according to the corresponding relationship between the preset data interval and the frequency of sending TCP heartbeat packets;

[0031] According to the determined sending frequency of the TCP heartbeat packet, the device end transmits the TCP heartbeat packet based on the Wi-Fi link to the smart end.

[0032] In conjunction with the second aspect, in a second possible implementation of the second aspect, transmitting a TCP heartbeat packet based on a Wi-Fi link between the device end and the smart end includes:

[0033] The device side obtains the detection data of the device side;

[0034] The device side determines a change trend of the detection data;

[0035] Determining detection data for a predetermined period in the future based on the trend, and determining, by the device end, a frequency of sending TCP heartbeat packets between the smart end and the device end based on the detection data for the predetermined period in the future;

[0036] According to the determined sending frequency of the TCP heartbeat packet, the device end transmits the TCP heartbeat packet based on the Wi-Fi link to the smart end.

[0037] A third aspect of an embodiment of the present application provides a data transmission device, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the computer program, the data transmission device implements the method described in any one of the first aspect or the second aspect.

[0038] A fourth aspect of the embodiments of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method of the first aspect, the second aspect, or each implementation thereof.

[0039] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method described in any one of the first aspect or the second aspect.

[0040] A sixth aspect of the present application provides a chip for implementing the methods described in each implementation of the first aspect. Specifically, the chip includes a processor configured to retrieve and execute a computer program from a memory, causing a device equipped with the chip to execute the methods described in the first aspect or its implementations.

[0041] Compared with the prior art, the beneficial effects of the embodiments of the present application are as follows: the embodiments of the present application transmit TCP heartbeat packets based on the Wi-Fi link between the smart end and the device end in advance. When the device end detects the data to be sent, when the TCP connection is determined by the TCP heartbeat packet, the device end sends a data update instruction to the smart end, so that the smart end can promptly know that it needs to obtain the data to be sent. The smart end sends a Bluetooth connection request to the paired device end according to the data update instruction, and establishes a Bluetooth link for data transmission based on the Bluetooth connection request. By actively sending the Bluetooth connection request by the smart end, the probability of the device end being blocked due to the untimely response of the smart end can be reduced, which is conducive to improving the reliability of the smart end in obtaining data. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0043] Figure 1 This is a schematic diagram of an implementation scenario of a data transmission method provided in an embodiment of the present application;

[0044] Figure 2This is a schematic diagram of an implementation flow of a data transmission method provided in an embodiment of the present application;

[0045] Figure 3 This is a schematic diagram of an implementation flow of a method for transmitting a TCP heartbeat packet provided in an embodiment of the present application;

[0046] Figure 4 This is a schematic diagram of an implementation flow of a method for transmitting a TCP heartbeat packet provided in an embodiment of the present application;

[0047] Figure 5 is a schematic diagram of a data transmission device provided in an embodiment of the present application;

[0048] Figure 6 This is a schematic diagram of a data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0050] In order to illustrate the technical solution described in this application, specific embodiments are provided below.

[0051] Bluetooth Low Energy (BLE) technology is renowned for its extremely low energy consumption, fast transmission rates, and small data transfer volumes. This technology is widely used in smart devices that require high battery life and low data transmission requirements, such as smartwatches, smart home devices, and various sensors. Its applications are extensive. For example, in industrial automation and smart homes, Bluetooth Low Energy is often used to transmit data, extending device usage.

[0052] However, in practice, if data on the device side is updated, the smart side may not be able to quickly detect the change. Although the slave device can actively report data updates by sending "notifications" or "indications" to the host through BLE technology, if the host fails to respond in time, the slave device may be blocked, which in turn affects the host's ability to send critical request instructions and data, hindering the smart side from quickly and reliably receiving the latest data updates.

[0053] Based on the above problems, the embodiment of the present application proposes a data transmission method, such as Figure 1The figure shows a schematic diagram of an implementation scenario of the data transmission method, which includes an intelligent terminal 1 and a device terminal 2, wherein the device terminal 2 can generate data to be transmitted. For example, the device terminal 2 can be a device such as an inverter. The data to be transmitted generated by the device terminal 2 can be data in an abnormal operating state. For example, the device terminal 2 can include a sensor device 21, including a temperature sensor, a smoke sensor, etc. The device terminal 2 analyzes the data collected by the sensor device 21 to determine whether the collected data is data in an abnormal operating state. If the collected data is data in an abnormal operating state, the data is determined to be data to be sent. The intelligent terminal can be a smart device such as a smartphone or a tablet computer.

[0054] Device 2 and Smart Device 1 can establish a dual-channel connection, consisting of a Bluetooth connection and a Wi-Fi-based TCP (Transmission Control Protocol) connection. When Device 2 is operating normally, the Bluetooth connection between Smart Device 1 and Device 2 is disconnected, and TCP heartbeat packets are transmitted between Smart Device 1 and Device 2. This keeps the connection between Smart Device 1 and Device 2 alive through the transmission and reception of TCP heartbeat packets. Because TCP heartbeat packets carry very little data, power consumption is very low.

[0055] When device 2 is in an abnormal operating state, it sends a data update command via a TCP connection. After receiving the data update command, smart terminal 1 sends a Bluetooth connection request to device 2. After receiving the Bluetooth connection request, device 2 sends a request response to smart terminal 1. After receiving the request response, smart terminal 1 establishes a connection based on the request response and transmits the data to be sent via a low-power Bluetooth connection link. By sending the data update command from device 2 to smart terminal 1, smart terminal 1 can promptly learn that it needs to obtain the data to be sent. By having smart terminal 1 actively send a Bluetooth connection request, the probability of device 2 being blocked due to a delay in responding from smart terminal 1 can be reduced, which helps improve the reliability of data acquisition by smart terminal 1.

[0056] Figure 2 A schematic diagram of an implementation flow of a data transmission method provided in an embodiment of the present application is detailed as follows:

[0057] In S201, a TCP heartbeat packet based on a Wi-Fi link is transmitted between the smart terminal and the device terminal.

[0058] The TCP heartbeat packet in the embodiment of the present application is a heartbeat packet based on TCP keepalive transmission between the intelligent terminal and the device terminal. The TCP heartbeat packet may include information such as a heartbeat identifier and a transmission time, or may also include information such as a transmission interval. The intelligent terminal can determine that the received data is a TCP heartbeat packet for TCP link keepalive based on the heartbeat identifier included in the received TCP heartbeat packet. The link quality of the TCP link, i.e., the transmission delay of the TCP data, is determined based on the timestamp of the transmission time.

[0059] A TCP connection over a Wi-Fi link uses Wi-Fi wireless communication technology to establish and maintain a TCP (Transmission Control Protocol) connection. TCP is a connection-oriented, reliable, byte-stream-based transport layer communication protocol, while Wi-Fi (Wireless Fidelity) is a wireless local area network technology that allows electronic devices to connect to the internet or communicate with each other via wireless signals. The power consumption of a Wi-Fi connection is positively correlated with the amount of data transmitted; the greater the amount of data transmitted, the more power is consumed. TCP heartbeat packets are transmitted at predetermined intervals. Because the amount of data transmitted is very small, transmitting TCP heartbeat packets over a TCP link consumes very little power.

[0060] The TCP heartbeat packet can be sent from the device end to the smart end, or from the smart end to the device end. In a possible implementation, the embodiment of the present application can determine the sending method of the TCP heartbeat packet based on the detection data obtained by the device end, such as Figure 3 As shown, the method includes:

[0061] In S301, the device side obtains detection data of the device side.

[0062] In the embodiments of the present application, the device side may include a sensor device for detecting operating status. For example, in an energy storage system, the inverter may include a temperature sensor for detecting temperature, a smoke sensor for detecting smoke, etc. However, this is not limiting and other sensor devices may also be included to detect whether the device side is in a normal operating state.

[0063] In S302, the device side determines the data interval to which the detection data of the device side belongs.

[0064] The acquired detection data can be compared with the set standard data range to determine whether the detection data is abnormal data. For example, the normal temperature range can be set to be less than a pre-set temperature threshold, such as less than 75 degrees Celsius. The currently collected detection data, that is, the temperature, is compared with the temperature threshold. If the currently collected temperature is less than 75 degrees Celsius, it means that the temperature data is normal data. If the currently collected temperature is greater than or equal to 75 degrees Celsius, it means that the temperature data is abnormal data. When it is determined that the collected data is abnormal data, a data update instruction can be sent to the sending intelligent terminal through a TCP connection to update the data to be transmitted to the intelligent terminal.

[0065] When the detected data is normal data, the data range to which the collected data belongs can be determined. For example, when the currently collected temperature is less than a temperature threshold, the temperature range to which the currently collected temperature belongs can be determined. For example, temperature ranges may include [65°C-75°C], [55°C-65°C], [45°C-55°C], [35°C-45°C], and temperature ranges less than 35°C.

[0066] In S303, the device end determines the frequency of sending TCP heartbeat packets between the smart end and the device end according to the correspondence between the preset data interval and the frequency of sending TCP heartbeat packets.

[0067] You can pre-set the relationship between different data intervals and transmission frequencies. Generally, the smaller the difference between the value in the data interval and the most recent abnormal value, the higher the frequency of TCP heartbeat packet transmission. For example, the higher the temperature in the temperature interval and the smaller the difference from 75°C, the higher the frequency of TCP heartbeat packet transmission.

[0068] In S304, according to the determined frequency of sending the TCP heartbeat packet, the device transmits the TCP heartbeat packet based on the Wi-Fi link to the smart terminal.

[0069] Sending TCP heartbeat packets according to the determined frequency of sending TCP heartbeat packets can more reliably determine the status of the TCP link, thereby more reliably sending data update instructions through the TCP connection, or also called the TCP link, to improve the reliability of status acquisition.

[0070] In a possible implementation, the embodiment of the present application can also determine the change trend of the data based on the collected data, and determine the transmission frequency of the TCP heartbeat packet based on the change trend of the data, such as Figure 4 As shown, the method includes:

[0071] In S401, the device side obtains detection data of the device side.

[0072] In the embodiments of the present application, the device side may include a sensor device for detecting operating status. For example, in an energy storage system, the inverter may include a temperature sensor for detecting temperature, a smoke sensor for detecting smoke, etc. However, this is not limiting and other sensor devices may also be included to detect whether the device side is in a normal operating state.

[0073] In S402, the device determines a change trend of the detection data.

[0074] Based on the acquired detection data, a straight line or curve can be obtained by data fitting. The change trend of the detection data can be determined based on the slope of the fitted straight line, or the change of future data can be predicted based on the fitted curve, that is, the change trend of the detection data can be obtained.

[0075] In a possible implementation, matching analysis may be performed in combination with historical data to determine a change trend of the currently acquired detection data.

[0076] In S403, detection data of a predetermined period in the future is determined according to the trend, and the device end determines a frequency of sending TCP heartbeat packets between the smart end and the device end according to the detection data of the predetermined period in the future.

[0077] According to the changing trend of the determined detection data, the embodiment of the present application can estimate the detection data of the future predetermined period. For example, the size of the detection data in the predetermined period after the current time node and closest to the current time node can be estimated. The transmission frequency corresponding to the detection data estimated in the future predetermined period can be determined based on the corresponding relationship between the size of the detection data and the transmission frequency. Alternatively, the transmission frequency corresponding to the detection data estimated in the future predetermined period can be determined based on the data interval to which the estimated detection data belongs.

[0078] In S404, according to the determined frequency of sending the TCP heartbeat packet, the device transmits the TCP heartbeat packet based on the Wi-Fi link to the smart terminal.

[0079] Sending TCP heartbeat packets according to the determined frequency of sending TCP heartbeat packets can more reliably determine the status of the TCP link, thereby more reliably sending data update instructions through the TCP connection, or also called the TCP link, to improve the reliability of status acquisition.

[0080] In S202, the smart terminal receives a data update instruction sent by the device terminal through the TCP connection determined by the TCP heartbeat packet. The data update instruction is generated when the device terminal detects data to be sent.

[0081] Based on the transmitted TCP heartbeat packet, it is possible to determine whether the TCP connection is reliable and valid. For example, the reliability of the TCP connection between the smart terminal and the device can be determined based on whether the TCP heartbeat packet is successfully transmitted or the transmission delay. If the TCP connection between the smart terminal and the device meets the reliability requirements, such as the delay between the smart terminal and the device is less than a predetermined duration, the device can transmit a data update instruction to the smart terminal via the TCP connection.

[0082] In the embodiment of the present application, the device end can act as a TCP server to send data update instructions to the smart end as a TCP client. No additional communication link needs to be established, and the status of new data to be sent can be quickly and effectively updated to the smart end.

[0083] In S203, according to the data update instruction, the smart terminal sends a Bluetooth connection request to the device terminal that has completed Bluetooth pairing with the smart terminal.

[0084] In the embodiment of the present application, the device end and the smart end can complete the pairing operation in advance. The smart end can act as a Bluetooth host and the device end can act as a Bluetooth slave. The smart end can set the Bluetooth connection to a disconnected state when there is no data to be sent to the device end, thereby saving power consumption of the device end acting as a Bluetooth slave.

[0085] The smart terminal as the Bluetooth host can obtain data update instructions through the TCP connection. Compared with the polling method at a predetermined time interval, the acquisition efficiency of data update instructions is higher and the status of data update is known more promptly.

[0086] Compared with the method in which the device side actively sends notifications or instructions, the embodiment of the present application sends notifications or instructions (data update instructions) through a TCP connection, which can effectively reduce the probability of slave blocking, making the host's key request instructions more reliable, and is conducive to the smart terminal to obtain updated data to be transmitted in a timely and reliable manner.

[0087] In S204, the smart end receives the request response from the device end and establishes a Bluetooth connection according to the request response, and transmits the data to be sent according to the Bluetooth connection.

[0088] After the device responds to the Bluetooth connection request from the smart terminal, for example, if the device accepts the connection, a Bluetooth connection between the device and the smart terminal can be established. Based on the established Bluetooth connection, the device transmits the data to be sent to the smart terminal.

[0089] In a possible implementation, the embodiment of the present application can also close or disconnect the Bluetooth connection when it detects that the transmission of the data to be sent is completed, so that the device end as the Bluetooth slave does not need to monitor, thereby improving the battery life of the device end. The smart end can receive the data to be transmitted based on the Bluetooth connection. After the data to be transmitted is sent, the smart end can close the Bluetooth connection based on the end mark of the transmitted data to be sent. After detecting that the data to be sent is successfully sent, the device end closes the Bluetooth connection, for example, the Bluetooth module can be put into a power-off state.

[0090] In possible implementations, embodiments of the present application can also determine the transmission frequency of the TCP heartbeat packet according to the transmission state of data to be sent. For example, after the Bluetooth connection is established, the transmission of the TCP heartbeat packet between the device end and the intelligent end can be stopped, or the transmission frequency of the TCP heartbeat packet between the device end and the intelligent end can be reduced. After the transmission of data to be sent is completed, or after the Bluetooth connection is closed, the transmission of the TCP heartbeat packet between the device end and the intelligent end can be recovered, or the transmission frequency of the TCP heartbeat packet between the device end and the intelligent end can be improved. Thereby, the transmission frequency of the TCP heartbeat packet can effectively adapt to the requirement of instruction transmission.

[0091] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0092] Figure 5 A schematic diagram of a data transmission device provided in an embodiment of the present application, the device comprising:

[0093] A first heartbeat packet transmission unit 501 is configured to transmit a TCP heartbeat packet based on a Wi-Fi link between the smart terminal and the device terminal;

[0094] a data update instruction receiving unit 502, configured to receive, by the intelligent terminal, a data update instruction sent by the device terminal via the TCP connection determined by the TCP heartbeat packet, wherein the data update instruction is generated when the device terminal detects data to be sent;

[0095] A Bluetooth connection request sending unit 503 is configured to send a Bluetooth connection request from the smart terminal to the device terminal that has completed Bluetooth pairing with the smart terminal according to the data update instruction;

[0096] The first data transmission unit 504 is configured to receive the request response from the device end by the smart end, establish a Bluetooth connection according to the request response, and transmit the data to be sent according to the Bluetooth connection.

[0097] Alternatively, an embodiment of the present application further provides another data transmission device, the device comprising:

[0098] A second heartbeat packet transmission unit is used to transmit a TCP heartbeat packet based on a Wi-Fi link between the device end and the intelligent end;

[0099] a data update instruction sending unit, configured to send a data update instruction via a TCP connection determined by the TCP heartbeat packet when the device detects data to be sent;

[0100] A Bluetooth connection request receiving unit, configured to receive the Bluetooth connection request sent by the smart terminal from the device terminal, and send a request response to the smart terminal according to the Bluetooth request;

[0101] The second data transmission unit is configured to establish a Bluetooth connection by the device according to the request response, and transmit the data to be sent according to the Bluetooth connection.

[0102] The data transmission device and Figure 2 The data transmission method shown corresponds to .

[0103] Figure 6 Schematic diagram of a data transmission device provided in an embodiment of the present application. Figure 6 As shown, the data transmission device 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62, such as a data transmission program, stored in the memory 61 and executable on the processor 60. When the processor 60 executes the computer program 62, the steps of the aforementioned data transmission method embodiments are implemented. Alternatively, when the processor 60 executes the computer program 62, the functions of the modules / units in the aforementioned apparatus embodiments are implemented.

[0104] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to implement the present application. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 62 in the data transmission device 6.

[0105] The data transmission device 6 can be an intelligent terminal or a device terminal. The intelligent terminal can be a computing device such as a desktop computer, a notebook, a palmtop computer, etc. The data transmission device can include, but is not limited to, a processor 60 and a memory 61. It can be understood by those skilled in the art that Figure 6It is only an example of a data transmission device 6 and does not constitute a limitation of the data transmission device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the data transmission device may also include input and output devices, network access devices, buses, etc.

[0106] The processor 60 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0107] The memory 61 can be an internal storage unit of the data transmission device 6, such as a hard drive or memory of the data transmission device 6. The memory 61 can also be an external storage device of the data transmission device 6, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the memory 61 can include both the internal storage unit of the data transmission device 6 and an external storage device. The memory 61 is used to store the computer program and other programs and data required by the data transmission device. The memory 61 can also be used to temporarily store data that has been output or is about to be output.

[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0109] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0110] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0111] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0112] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0113] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0114] If the integrated module / unit is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the process steps in the above-mentioned method embodiments through hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer-readable medium can be appropriately increased or decreased based on the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

[0115] In addition, an embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the methods in the above-mentioned implementation manners.

[0116] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A data transmission method, characterized in that: The method comprises: Transmitting a TCP heartbeat packet based on a Wi-Fi link between a smart terminal and a device terminal, comprising: the device terminal acquiring detection data of the device terminal, and determining, based on the detection data, the frequency of sending the TCP heartbeat packet between the smart terminal and the device terminal; The smart terminal receives the data update instruction sent by the device terminal through the TCP connection determined by the TCP heartbeat packet, and the data update instruction is generated when the device terminal detects data to be sent; According to the data update instruction, the smart terminal sends a Bluetooth connection request to the device terminal that has completed Bluetooth pairing with the smart terminal; The smart end receives the request response from the device end and establishes a Bluetooth connection according to the request response, and transmits the data to be sent according to the Bluetooth connection.

2. The method according to claim 1, characterized in that The intelligent terminal receives the data update instruction sent by the device terminal through the TCP connection determined by the TCP heartbeat packet, including: The intelligent terminal determines the connection status between the intelligent terminal and the device terminal through the TCP heartbeat packet; Based on the device states of the smart terminal and the device terminal, the smart terminal serving as a TCP client receives a data update instruction sent by the device terminal serving as a TCP server terminal.

3. The method according to claim 1, characterized in that According to the data update instruction, the smart terminal sends a Bluetooth connection request to the device terminal that has completed Bluetooth pairing with the smart terminal, including: According to the data update instruction, the smart terminal as the Bluetooth host searches for Bluetooth connection information of the paired device terminal as the Bluetooth slave; According to the Bluetooth connection information, the smart terminal sends a Bluetooth connection request to the device terminal.

4. The method according to any one of claims 1 to 3, characterized in that After the smart terminal receives the request response from the device terminal and establishes a Bluetooth connection according to the request response, and transmits the data to be sent according to the Bluetooth connection, the method further includes: After the data to be sent is sent, the Bluetooth connection is closed.

5. The method according to any one of claims 1 to 3, characterized in that After the smart terminal receives the request response from the device terminal and establishes a Bluetooth connection according to the request response, the method further includes: The intelligent terminal stops transmitting the TCP heartbeat packet to the device terminal, or the intelligent terminal reduces the frequency of transmitting the TCP heartbeat packet to the device terminal; After the data to be sent is transmitted, the method further includes: The intelligent end resumes the transmission of the TCP heartbeat packets between the intelligent end and the device end, or the intelligent end increases the transmission frequency of the TCP heartbeat packets between the intelligent end and the device end.

6. A data transmission method, characterized in that: The method comprises: Transmitting a TCP heartbeat packet based on a Wi-Fi link between a device end and an intelligent end, comprising: the device end obtaining detection data of the device end, and determining, based on the detection data, a frequency of sending the TCP heartbeat packet between the intelligent end and the device end; When the device detects data to be sent, the device sends a data update instruction through the TCP connection determined by the TCP heartbeat packet; The device receives the Bluetooth connection request sent by the smart terminal, and sends a request response to the smart terminal according to the Bluetooth request; The device side establishes a Bluetooth connection according to the request response, and transmits the data to be sent according to the Bluetooth connection.

7. The method according to claim 6, characterized in that The TCP heartbeat packets transmitted between the device and the smart terminal over the Wi-Fi link include: The device side obtains the detection data of the device side; The device side determines the data interval to which the detection data of the device side belongs; The device determines the frequency of sending TCP heartbeat packets between the smart terminal and the device according to the corresponding relationship between the preset data interval and the frequency of sending TCP heartbeat packets; According to the determined sending frequency of the TCP heartbeat packet, the device end transmits the TCP heartbeat packet based on the Wi-Fi link to the smart end.

8. The method according to claim 6, characterized in that The TCP heartbeat packets transmitted between the device and the smart terminal over the Wi-Fi link include: The device side obtains the detection data of the device side; The device side determines a change trend of the detection data; Determining detection data for a predetermined period in the future based on the trend, and determining, by the device end, a frequency of sending TCP heartbeat packets between the smart end and the device end based on the detection data for the predetermined period in the future; According to the determined sending frequency of the TCP heartbeat packet, the device end transmits the TCP heartbeat packet based on the Wi-Fi link to the smart end.

9. A data transmission device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the data transmission device implements the method according to any one of claims 1 to 8.

10. A computer program product comprising computer program instructions, characterized in that When the computer program is executed, the method according to any one of claims 1 to 8 is performed.

Citation Information

Patent Citations

  • File sharing method and system, sending end device and receiving end device

    CN114071789A

  • Bluetooth test method and device, storage medium and program product

    CN118200969A