Data transmission method, data transmission device, electronic equipment and storage medium
By successfully matching the verification information between the receiver and the sender in the BLE Mesh protocol, switching to the 2.4G protocol for data transmission solves the problem of low transmission efficiency of the BLE Mesh protocol and achieves more efficient data transmission.
Patent Information
- Application Number
- CN202410809294.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-11
AI Technical Summary
Due to the small length of data packets, the BLE Mesh protocol requires multiple sub-packet transmissions and has low transmission efficiency.
The request information is received through the receiver. If the verification information matches successfully, the BLE Mesh protocol is switched to the 2.4G protocol to transmit data. The larger maximum transmission data length of a single packet of the 2.4G protocol is used to reduce the number of packets and improve transmission efficiency.
It effectively reduces the number of data packetizations and improves data transmission efficiency, especially when transmitting long data, which significantly improves performance.
Smart Images

Figure CN118764494A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication interaction technology, and in particular to a data transmission method, a data transmission device, an electronic device and a storage medium. Background Art
[0002] Bluetooth Low Energy Mesh (BLE Mesh) is a public protocol and a communication protocol based on the Bluetooth Low Energy protocol. It allows a large number of Bluetooth Low Energy devices to form a mesh network, and realize the interconnection and collaborative control between devices within a sufficiently large physical coverage area, thereby meeting the communication needs in multi-device scenarios. The BLE Mesh communication protocol supports excellent features such as low power consumption, scalability, flexibility, high reliability, and security, and has a wide range of application value in smart homes, smart lighting, industrial automation, medical health, environmental monitoring and other fields.
[0003] Relatively speaking, the data packet length of BLE Mesh is much smaller than that of private protocols such as the 2.4G protocol. Correspondingly, the maximum transmission data of a single packet of BLE Mesh is also much smaller than that of private protocols such as the 2.4G protocol. This means that when BLE Mesh is used to transmit data that is larger than the maximum transmission data of a single packet of BLE Mesh, the data needs to be packetized multiple times before being transmitted, resulting in low transmission efficiency. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a data transmission method, a data transmission device, an electronic device and a storage medium, which can solve the technical problem in the prior art that when using BLE Mesh to transmit data, the data needs to be first packetized multiple times and then the packetized data is transmitted, resulting in low transmission efficiency.
[0005] In order to achieve the above-mentioned object of the invention, on the one hand, the present application provides a data transmission method, which comprises the following specific steps:
[0006] receiving a request message through a receiving party; the request message includes current verification information;
[0007] Obtaining reference information of the recipient; the reference information includes reference verification information;
[0008] If the current verification information matches the reference verification information successfully, the first communication protocol is switched to the second communication protocol to transmit the data to be transmitted; the maximum transmission data of a single packet of the second communication protocol is greater than the maximum transmission data of a single packet of the first communication protocol.
[0009] In a possible embodiment, the request information is received by a receiving party; the request information includes, before the current verification information, the following:
[0010] The request information is sent by the sender based on the first communication protocol.
[0011] In a possible embodiment, if the current verification information and the reference verification information match successfully, switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted includes:
[0012] suspending data transmission based on the first communication protocol;
[0013] If the current verification information matches the reference verification information successfully, after a first preset time interval, the data to be transmitted is sent by the sender based on the second communication protocol;
[0014] Within a second preset time, the data to be transmitted is received by the receiving party based on the second communication protocol.
[0015] In a possible embodiment, if the current verification information matches the reference verification information successfully, after switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted, the method further includes:
[0016] If the current verification information fails to match the reference verification information, suspending data transmission based on the first communication protocol within a third preset time, and storing the data to be sent accumulated by the sender within the third preset time;
[0017] The data to be sent is sent by the sender based on the first communication protocol.
[0018] In a possible embodiment, if the current verification information matches the reference verification information successfully, after switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted, the method further includes:
[0019] After the transmission of the data to be transmitted is completed, the second communication protocol is switched back to the first communication protocol.
[0020] In a possible embodiment, the request information is received by a receiving party; the request information includes, before the current verification information, the following:
[0021] The reference verification information is determined based on the recipient.
[0022] In a possible embodiment, after the reference verification information is determined based on the receiving party, the method further includes:
[0023] Synchronize reference calibration information across the network.
[0024] On the other hand, an embodiment of the present application provides a data transmission device, the data transmission device comprising:
[0025] A data receiving module, used for receiving request information through a receiving party; the request information includes current verification information;
[0026] A data acquisition module is used to acquire the reference information of the receiver; the reference information includes reference verification information;
[0027] The execution module is used to switch from the first communication protocol to the second communication protocol to transmit the data to be transmitted if the current verification information and the reference verification information match successfully; the maximum transmission data of a single packet of the second communication protocol is greater than the maximum transmission data of a single packet of the first communication protocol.
[0028] In a possible embodiment, the data transmission device further includes a data sending module, and the data sending module is used to send request information based on the first communication protocol through the sender.
[0029] In a possible embodiment, the execution module is used to suspend data transmission based on a first communication protocol; if the current verification information and the reference verification information match successfully, after a first preset time interval, the data to be transmitted is sent by the sender based on the second communication protocol; within a second preset time, the data to be transmitted is received by the receiver based on the second communication protocol.
[0030] In a possible embodiment, the execution module is also used to suspend data transmission based on the first communication protocol within a third preset time if the current verification information and the reference verification information fail to match, and store the data to be sent accumulated by the sender within the third preset time; and send the data to be sent based on the first communication protocol through the sender.
[0031] In a possible embodiment, the execution module is further configured to switch from the second communication protocol back to the first communication protocol after the transmission of the data to be transmitted is completed.
[0032] In a possible embodiment, the data receiving module is further configured to determine reference verification information based on a receiving party.
[0033] In a possible embodiment, the data receiving module is further used to synchronize the reference verification information to the entire network.
[0034] On the other hand, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement any one of the above data transmission methods.
[0035] On the other hand, an embodiment of the present application provides a computer-readable storage device, in which the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement any one of the above data transmission methods.
[0036] The embodiments of the present application provide a data transmission method, a data transmission device, an electronic device, and a storage medium, which have the following beneficial effects:
[0037] The present application provides a data transmission method, a data transmission device, an electronic device and a storage medium, the data transmission method includes receiving a request message through a receiver, the request message includes current verification information, obtaining the receiver's reference information, the reference information includes reference verification information, if the current verification information and the reference verification information match successfully, switching from a first communication protocol to a second communication protocol to transmit the data to be transmitted, the maximum transmission data of a single packet of the second communication protocol is greater than the maximum transmission data of a single packet of the first communication protocol. In an embodiment of the present application, by switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted after the current verification information and the reference verification information match successfully, the number of times the data to be transmitted is packetized is reduced, and the data transmission efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 A schematic diagram of an application environment provided for an embodiment of the present application;
[0040] Figure 2 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 1 ;
[0041] Figure 3 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 2 ;
[0042] Figure 4 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 3 ;
[0043] Figure 5 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 4 ;
[0044] Figure 6 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 5 ;
[0045] Figure 7 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 6 ;
[0046] Figure 8 It is a schematic diagram of a data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0048] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0049] See also Figure 1 , Figure 1 Schematic diagram of an application environment provided by an embodiment of the present application. Figure 1 As shown, the schematic diagram includes a sender 101, a receiver 102 and a networking party 103.
[0050] In a possible embodiment, the sender 101 may be used to send data to be transmitted. The sender 101 may include an electronic device for sending information such as data and images, and may specifically be a mobile phone, a mobile phone, a laptop computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a mobile terminal such as a vehicle terminal (such as a vehicle navigation terminal), and a fixed terminal such as a digital TV, a desktop computer, etc. The sender 101 may also include a sending module for sending information, such as a node capable of sending data.
[0051] Among them, when the sender 101 is a node that sends data, the sender 101 can not only be used to send data, but also has the additional ability to receive data, that is, when data needs to be sent through the sender 101, the sender can execute the sending of information, and when the sender 101 needs to receive data, the sender 101 can also execute the receiving of information.
[0052] Optionally, the receiver 102 may be used to receive data to be transmitted. The receiver 102 may include an electronic device for receiving information such as data and images, and may specifically be a mobile phone, a mobile phone, a laptop computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a mobile terminal such as a vehicle terminal (such as a vehicle navigation terminal), and a fixed terminal such as a digital TV, a desktop computer, etc. The receiver 102 may also include a receiving module for receiving information, such as a node capable of receiving data.
[0053] Among them, when the receiver 102 is a node that receives data, in addition to being able to receive data, the receiver 102 can also have the additional ability to send data, that is, when data needs to be received through the receiver 102, the receiver 102 can execute data reception, and when the receiver 102 needs to send data, the receiver 102 can also execute data sending.
[0054] Optionally, the networking party 103 can be used to build and manage the network. The networking party 103 may include electronic devices for building and managing the network, specifically mobile terminals such as mobile phones, mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The networking party 103 may also include a network management module for building and managing the network, such as a network management node that can build and manage the network, and the network management node can be used to add and delete other nodes on the public network.
[0055] Among them, when the networking party 103 acts as a network management node that can build and manage the network, the networking party 103 can also have the additional ability to send and receive data, that is, at this time the networking party 103 can perform network management as a networking party, and can also perform data sending and receiving as a transceiver.
[0056] Optionally, the sender 101, the receiver 102 and the network builder 103 can all be used to form a public network, and the sender 101, the receiver 102 and the network builder 103 can be connected to a public bus and realize data transmission based on the public bus. Among them, the sender 101 and the network builder 103 are both optional components of the public network. When the public network does not include the sender 101 and the network builder 103, data can also be transmitted through the receiver 102.
[0057] Among them, the sender 101, the receiver 102 and the networker 103 can all be nodes connected to the public bus, and the networker 103 can read the information of the sender 101 and the receiver 102 based on the public bus. The identities of the sender 101, the receiver 102 and the networker 103 can be transformed, that is, the sender 101 can also be transformed into the receiver 102 or the networker 103 according to different requirements, the receiver 102 can also be transformed into the sender 101 or the networker 103 according to different requirements, and the networker 103 can also be transformed into the sender 101 or the receiver 102 according to different requirements.
[0058] Optionally, the same public network may include N senders 101, N receivers 102, and one networking party 103, and one networking party 103 can be used to manage the N senders 101 and N receivers 102 on the public bus. N may refer to an integer greater than one or equal to one.
[0059] Optionally, the sender 101, the receiver 102 and the networking party 103 can communicate with each other by wires, optical fibers, etc., or can communicate wirelessly by electromagnetic waves, Bluetooth, and Wi-Fi (wireless network communication technology). The sender 101, the receiver 102 and the networking party 103 can be used to adapt to various communication protocols. The sender 101 and the receiver 102 can be used to adapt to public protocols such as the TCP / IP protocol and BLE Mesh, and can also be used to adapt to private protocols such as the 2.4G protocol.
[0060] In a specific embodiment, the sender 101 and the receiver 102 can communicate based on BLE Mesh, and can also communicate based on the 2.4G protocol. Compared with the communication using the BLE Mesh communication protocol, the 2.4G communication protocol has a larger data length of the maximum transmission data of a single packet, and correspondingly has a larger maximum transmission data of a single packet. The sender 101 and the receiver 102 can implement the protocol conversion between the BLE Mesh protocol and the 2.4G protocol, that is, the sender 101 and the receiver 102 can switch from BLE Mesh to the 2.4G protocol for data transmission, and can also switch from the 2.4G protocol to BLE Mesh for data transmission.
[0061] Among them, when the sender 101 and the receiver 102 communicate based on BLE Mesh, the sender 101 and the receiver 102 use the BLE Mesh protocol stack to transmit information, and when the sender 101 and the receiver 102 communicate based on the 2.4G protocol, the sender 101 and the receiver 102 use the 2.4G protocol stack to transmit information.
[0062] The following is a specific embodiment of a data transmission method of the present application. Figure 2 , Figure 2 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 1 . This specification provides method operation steps such as embodiments or flow charts, but may include more or fewer operation steps based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual device, system or server product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or drawings (for example, in a parallel processor or multi-threaded processing environment). Among them, the data transmission method can be executed by a data transmission device, and the data transmission device and the data transmission method are based on the same application concept. As Figure 2 As shown, the data transmission method includes the following specific steps:
[0063] S1: Receive request information through a receiver, where the request information includes current verification information.
[0064] In a possible embodiment, the data transmission device may receive the request information through the receiver 102. The receiver 102 may receive the request information based on the first communication protocol, and the request information may be a request packet that can be received by the receiver 102. Specifically, the first communication protocol may be a BLE Mesh protocol.
[0065] Optionally, the request information may include current verification information, which may be used to match with the receiver 102. The receiver 102 may be a specific receiving node for receiving data, and the current verification information may be a node serial number corresponding to the specific receiving node, thereby matching with the specific receiving node.
[0066] When the sender 101 needs to communicate with a specific receiving node and the length of the data to be transmitted sent by the sender 101 is greater than the preset length, the sender 101 sends a request message matching the specific receiving node. Optionally, the preset length can be the maximum transmission length of a single packet of the first communication protocol.
[0067] S2: Obtain reference information of the receiver, where the reference information includes reference verification information.
[0068] Optionally, the data transmission device may obtain reference information of the receiver 102. The receiver 102 may be a specific receiving node for receiving data, and the data transmission device may include a sequence number list consisting of node sequence numbers of all receivers 102 connected to the public network, and the data transmission device may obtain the reference information of the receiver 102 by reading the sequence number list. The reference verification information may be a node sequence number corresponding to a specific receiving node.
[0069] S3: If the current verification information matches the reference verification information successfully, switch from the first communication protocol to the second communication protocol to transmit the data to be transmitted, and the maximum transmission data of a single packet of the second communication protocol is greater than the maximum transmission data of a single packet of the first communication protocol.
[0070] Optionally, the current verification information can be matched with the reference verification information. If the current verification information and the reference verification information match successfully, the receiver 102 can switch from the first communication protocol to the second communication protocol to transmit the data to be transmitted. Among them, the data length of the maximum transmission data of a single packet of the second communication protocol can be greater than the data length of the maximum transmission data of a single packet of the first communication protocol, and the length of the maximum transmission data of a single packet of the second communication protocol is also correspondingly greater than the length of the maximum transmission data of a single packet of the first communication protocol. The second communication protocol can be a private protocol including the 2.4G protocol, and the first communication protocol can be a public protocol including the BLE Mesh protocol.
[0071] In this embodiment, the current verification information and the reference verification information can be matched to determine whether the data length of the data to be transmitted is greater than the maximum transmission length of a single packet of the first communication protocol, and after the current verification information and the reference verification information match, the data to be transmitted is transmitted by switching from the first communication protocol to the second communication protocol, thereby reducing the number of times the data to be transmitted is packetized and improving data transmission efficiency.
[0072] Specifically, if the data length of the data to be transmitted is greater than the maximum transmission length of a single packet of the first communication protocol and less than the maximum transmission length of a single packet of the second communication protocol, the data to be transmitted does not need to be sub-packeted, thereby improving the data transmission efficiency. If the data length of the data to be transmitted is greater than the maximum transmission length of a single packet of the second communication protocol, the data to be transmitted still needs to be sub-packeted, but the number of sub-packeting times is reduced at this time, thereby also improving the data transmission efficiency.
[0073] In this embodiment, when the first communication protocol and the second communication protocol are used to communicate long data at a relatively short distance, the data to be transmitted can be transmitted by switching from the first communication protocol to the second communication protocol after the current verification information and the reference verification information match, thereby improving the transmission efficiency of the first communication protocol in transmitting long data at a relatively short distance. The relatively short distance can be a distance of tens of meters, and the long data can be data with a length greater than the maximum transmission length of a single packet of the first communication protocol.
[0074] See also Figure 3 , Figure 3 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 2 .like Figure 3 As shown, before executing S1: receiving request information through a receiver; the request information includes current verification information, the following steps are also included:
[0075] S4: The sender sends request information based on the first communication protocol.
[0076] In a possible embodiment, when the data length of the data to be transmitted is greater than the maximum transmission length of a single packet of the first communication protocol, the data transmission device may send a request message based on the first communication protocol through the sender 101, the request message may be a request packet that can be received by the receiver 102, the request message may include current verification information, and the request message may also include an access code corresponding to the receiver 102 and a communication channel for transmission based on the second communication protocol. The access code may be used to enable the receiver 102 to receive and identify the request message.
[0077] In this embodiment, the sender 101 can send request information based on the first communication protocol to enable the data transmission device to send the data to be transmitted, and the receiver 102 can receive the request information based on the first communication protocol to receive the data to be transmitted, thereby realizing the sending and receiving of the data to be transmitted in the public network.
[0078] See also Figure 4 , Figure 4 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 3 .like Figure 4 As shown, when executing S3: if the current verification information and the reference verification information match successfully, switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted, the following specific steps may be performed:
[0079] S301: suspending data transmission based on the first communication protocol.
[0080] In a possible embodiment, the data transmission device may suspend the data transmission between the sender 101 and the receiver 102 based on the first communication protocol.
[0081] When the data transmission device includes one sender 101 and one receiver 102, the data transmission device may suspend data transmission based on the first communication protocol between the sender 101 and the receiver 102. When the data transmission device includes several senders 101 and several receivers 102, the data transmission device may suspend all data transmissions based on the first data transmission between the several senders 101 and the several receivers 102.
[0082] S302: If the current verification information matches the reference verification information successfully, after a first preset time, the sender sends the data to be transmitted based on the second communication protocol.
[0083] Optionally, if the current verification information matches the reference verification information successfully, after a first preset time interval, the data transmission device may send the data to be transmitted based on the second communication protocol.
[0084] The first preset time may be a reserved time for realizing the conversion between the first communication protocol and the second communication protocol. During the first preset time, data transmission based on the first communication protocol stops, and data transmission based on the second communication protocol starts. To ensure that the operation of converting the first communication protocol to the second communication protocol proceeds smoothly, the first preset time may be slightly longer than the actual time of converting the first communication protocol to the second communication protocol. Optionally, the first preset time may be 5 milliseconds.
[0085] S303: Within a second preset time, the receiving party receives the data to be transmitted based on the second communication protocol.
[0086] Optionally, within the second preset time, the data transmission device receives the data to be transmitted through the receiver 102 based on the second communication protocol. The second preset time may be the communication time for the sender 101 and the receiver 102 to communicate based on the second communication protocol. In order to ensure that the sender 101 and the receiver 102 communicate based on the second communication protocol, the second preset time may be slightly longer than the actual time for the sender 101 and the receiver 102 to communicate based on the second communication protocol. Optionally, the second preset time may be 10 milliseconds. If the receiver 102 does not receive the data to be transmitted within the second preset time, the data transmission device may record a reception timeout.
[0087] In this embodiment, the data transmission device can suspend data transmission based on the first communication protocol and start data transmission based on the second communication protocol within the first preset time, thereby ensuring data conversion between the first communication protocol and the second communication protocol and improving the transmission efficiency of data transmission.
[0088] See also Figure 5 , Figure 5 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 4 .like Figure 5 As shown, after executing S3: if the current verification information and the reference verification information match successfully, switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted, the following steps are also included:
[0089] S501: If the current verification information fails to match the reference verification information, data transmission based on the first communication protocol is suspended within a third preset time, and the to-be-sent data accumulated by the sender within the third preset time is stored.
[0090] In a possible embodiment, the data transmission device may compare the current verification information with the reference verification information. If the current verification information fails to match the reference verification information, in order to avoid data transmission based on the first communication protocol and data transmission based on the second communication protocol in the data transmission device at the same time, which may cause the same receiver 102 to receive data based on the first communication protocol while being in a receiving state based on the second communication protocol, and the receiver 102 cannot process the data, the data transmission device may suspend the data transmission based on the first communication protocol between the sender 101 and the receiver 102 within the third preset time.
[0091] The third preset time is the waiting time for waiting for the data to be transmitted to be completed. In order to ensure that the process of waiting for the data to be transmitted to be completed can proceed smoothly, the third preset time can be slightly longer than the actual time for waiting for the data to be transmitted to be completed. Optionally, the third preset time can be equal to the second preset time, and the third preset time can be 10 milliseconds.
[0092] Optionally, when the data transmission device includes one sender 101 and one receiver 102, the data transmission device may suspend data transmission based on the first communication protocol between the sender 101 and the receiver 102. Optionally, when the number of senders 101 in the data transmission device is greater than or equal to two and the number of receivers 102 is greater than or equal to two, or the number of senders 101 is one and the number of receivers 102 is greater than or equal to two, or the number of senders 101 is greater than or equal to two and the number of receivers 102 is one, the data transmission device may suspend data transmission based on the first communication protocol between all senders 101 and all receivers 102 in the data transmission device.
[0093] Optionally, during the process of suspending data transmission based on the first communication protocol, the data transmission device may store the to-be-sent data accumulated by the sender 101 during this process.
[0094] S502: The sender sends the data to be sent based on the first communication protocol.
[0095] Optionally, after the third preset time expires, the data transmission device may send the accumulated data to be sent after the data transmission based on the first communication protocol is resumed, thereby resuming the data transmission based on the first communication protocol.
[0096] In this embodiment, the data transmission device can store the data to be sent accumulated by the sender 101 within the third preset time, and send the data to be sent after the third preset time ends, thereby restoring the data transmission based on the first communication protocol and preventing the data to be sent accumulated by the sender 101 within the third preset time from being lost.
[0097] See also Figure 6 , Figure 6 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 5 .like Figure 6 As shown, after executing S3: if the current verification information and the reference verification information match successfully, switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted, the following steps may also be included:
[0098] S6: After the transmission of the data to be transmitted is completed, switching from the second communication protocol back to the first communication protocol.
[0099] In a possible embodiment, after the transmission of the data to be transmitted is completed, the data transmission device can switch from the data transmission between the sender 101 and the receiver 102 based on the second communication protocol to the data transmission between the sender 101 and the receiver 102 based on the first communication protocol.
[0100] In this embodiment, except for the specific sender 101 that sends the data to be transmitted and the specific receiver 102 that receives the data to be transmitted, the other senders 101, receivers 102 and networking parties 103 are still in the data transmission state of the first communication protocol. After the data transmission to be transmitted is completed, the data transmission device can switch back to the original first communication protocol and perform data transmission based on the first communication protocol, thereby restoring the transmission state of the entire public network based on the first communication protocol.
[0101] See also Figure 7 , Figure 7 This is a schematic diagram of a data transmission method provided in an embodiment of the present application. Figure 6 .like Figure 6 As shown, before executing S1: receiving request information by a receiver; and the request information includes current verification information, the following steps may also be included:
[0102] S701: Determine reference verification information based on the receiving party.
[0103] In a possible embodiment, the data transmission device may determine the reference verification information based on the receiver 102. The receiver 102 may be a newly connected node. In this process, the data transmission party may query the newly connected receiver 102 whether the receiver 102 supports the first communication protocol and the second communication protocol, thereby determining the node type of the receiver 102, and feeding back the node type of the receiver 102 to the networking party 103.
[0104] Optionally, the networking party 103 may make a judgment based on the received node type, and when the node supports the first communication protocol and the second communication protocol at the same time, the data transmission device allocates reference verification information based on the receiving party 102 .
[0105] In this embodiment, the data transmission device can obtain the node serial number corresponding to each specific receiver 102 newly added to the network through the networking party 103, so that each receiver 102 newly added to the network can obtain reference information for subsequent matching, so that each receiver 102 can adapt to the data transmission method in the present application, thereby increasing the transmission efficiency of data transmission.
[0106] In a possible embodiment, after executing S6: determining reference verification information based on the receiver, the following steps may also be included:
[0107] S702: Synchronize the reference verification information to the entire network.
[0108] Optionally, the data transmission device may synchronize the reference verification information to the entire network. Specifically, the data transmission device may synchronize the reference verification information to all senders 101 and all receivers 102 in the entire network.
[0109] In this embodiment, when each sender 101 in the public network needs to send data that is larger than the maximum transmission data of a single packet of BLE Mesh, it can first determine whether the receiver 102 supports the second communication protocol based on the synchronized reference verification information, and then perform subsequent protocol conversion and other operations, thereby limiting the data to be transmitted to one data packet or reducing the number of data subpacketization times, thereby increasing the transmission efficiency of data transmission.
[0110] See also Figure 8 , Figure 8 Schematic diagram of a data transmission device provided in an embodiment of the present application. Figure 8 As shown, an embodiment of the present application provides a data transmission device, which includes a data receiving module 1001, a data acquisition module 1002 and an execution module 1003.
[0111] In a possible embodiment, the data receiving module 1001 is used to receive request information from a receiving party, and the request information includes current verification information. The data acquisition module 1002 is used to obtain reference information of the receiving party, and the reference information includes reference verification information. The execution module 1003 is used to switch from the first communication protocol to the second communication protocol to transmit the data to be transmitted if the current verification information and the reference verification information match successfully, and the data length of the single-packet maximum transmission data of the second communication protocol is greater than the data length of the single-packet maximum transmission data of the first communication protocol.
[0112] Optionally, the data transmission device further includes a data sending module 1004, and the data sending module 1004 is used to send request information based on the first communication protocol through the sender 101.
[0113] Optionally, the execution module 1003 is used to suspend data transmission based on the first communication protocol. If the current verification information and the reference verification information match successfully, after a first preset time interval, the data to be transmitted is sent by the sender 101 based on the second communication protocol, and within a second preset time, the data to be transmitted is received by the receiver based on the second communication protocol.
[0114] Optionally, the execution module 1003 is also used to suspend data transmission based on the first communication protocol within a third preset time if the current verification information and the reference verification information fail to match, and store the data to be sent accumulated by the sender 101 within the third preset time, and send the data to be sent based on the first communication protocol through the sender 101.
[0115] Optionally, the execution module 1003 is further configured to switch from the second communication protocol back to the first communication protocol after the transmission of the data to be transmitted is completed.
[0116] Optionally, the data receiving module 1001 is further configured to determine reference verification information based on a receiving party.
[0117] Optionally, the data receiving module 1001 is also used to synchronize the reference verification information to the entire network.
[0118] It should be noted that the device and method embodiments in the device embodiment are based on the same application concept.
[0119] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a data transmission method in an application provided in the above method embodiment.
[0120] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required for functions, etc., and the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0121] An embodiment of the present application also provides a storage medium, which can be set in a server to store at least one instruction, at least one program, a code set or an instruction set related to a page processing method in a method embodiment. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the data transmission method in the application provided in the above method embodiment.
[0122] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0123] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0124] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0125] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0126] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A data transmission method, characterized in that: The following steps are involved: Receiving request information through a receiving party; the request information includes current verification information; Obtaining reference information of the recipient; The reference information includes reference verification information; If the current verification information matches the reference verification information successfully, switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted; The maximum transmission data of a single packet of the second communication protocol is greater than the maximum transmission data of a single packet of the first communication protocol.
2. The data transmission method according to claim 1, characterized in that: The receiving party receives the request information; the request information includes, before the current verification information, the following: The request information is sent by the sender based on the first communication protocol.
3. The data transmission method according to claim 2, characterized in that: If the current verification information and the reference verification information match successfully, switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted includes: suspending data transmission based on the first communication protocol; If the current verification information matches the reference verification information successfully, after a first preset time interval, the data to be transmitted is sent by the sender based on the second communication protocol; Within a second preset time, the data to be transmitted is received by the receiving party based on the second communication protocol.
4. The data transmission method according to claim 2, characterized in that: If the current verification information matches the reference verification information successfully, after switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted, the method further includes: If the current verification information fails to match the reference verification information, suspending data transmission based on the first communication protocol within a third preset time, and storing the to-be-sent data accumulated by the sender within the third preset time; The data to be sent is sent by the sender based on the first communication protocol.
5. The data transmission method according to claim 1, characterized in that: If the current verification information matches the reference verification information successfully, after switching from the first communication protocol to the second communication protocol to transmit the data to be transmitted, the method further includes: After the transmission of the data to be transmitted is completed, switching from the second communication protocol back to the first communication protocol.
6. The data transmission method according to claim 1, characterized in that: The receiving party receives the request information; the request information includes, before the current verification information, the following: The reference verification information is determined based on the recipient.
7. The data transmission method according to claim 6, characterized in that: After determining the reference verification information based on the receiving party, the method further includes: The reference verification information is synchronized to the entire network.
8. A data transmission device, characterized in that: include: A data receiving module, used for receiving request information through a receiving party; The request information includes current verification information; A data acquisition module, used to acquire the reference information of the recipient; The reference information includes reference verification information; An execution module, configured to switch from the first communication protocol to the second communication protocol to transmit the data to be transmitted if the current verification information and the reference verification information match successfully; The maximum transmission data of a single packet of the second communication protocol is greater than the maximum transmission data of a single packet of the first communication protocol.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the data transmission method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the data transmission method as described in any one of claims 1-7.
