Data transmission method and device, electronic equipment and storage medium

By dynamically adjusting the transmission parameters and scanning time in the Bluetooth Mesh protocol, the problem of high power consumption of electronic equipment and waste of scanning time under the retransmission mechanism is solved, and more efficient data transmission is achieved.

CN118540773APending Publication Date: 2024-08-23TP-LINK
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410708098.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

When using the retransmission mechanism of the Bluetooth Mesh protocol for data transmission, electronic equipment consumes a lot of power and wastes scanning time, affecting efficiency.

Method used

Reduce unnecessary packet sending and scanning by dynamically adjusting target transmission parameters, including transmission intervals and transmission times, determining target transmission parameters based on historical data, and stopping sending data packets and scanning after receiving confirmation information.

Benefits of technology

It effectively reduces the power consumption of electronic equipment, improves data transmission efficiency, and reduces the possibility of network congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540773A
    Figure CN118540773A
Patent Text Reader

Abstract

The invention provides a data transmission method and device, electronic equipment and a storage medium. The first electronic equipment sends a data packet through Bluetooth broadcast according to the target transmission parameter, and stops sending the data packet under the condition that confirmation information replied by second electronic equipment is scanned, and the confirmation information replied by the second electronic equipment indicates that the second electronic equipment successfully receives the data packet sent by the first electronic equipment. Under the condition that the confirmation information replied by the second electronic equipment is scanned, the first electronic equipment confirms that the second electronic equipment successfully receives the data packet sent by the first electronic equipment, and the sending of the data packet can be stopped without sending the residual data packet, so that the number of times of sending the data packet by the first electronic equipment is reduced, and the user experience is improved. Therefore, the power consumption of the first electronic equipment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of Bluetooth communication technology, and in particular to a data transmission method, device, electronic device and storage medium. Background Art

[0002] The Bluetooth SIG has designed a retransmission mechanism for Bluetooth Mesh: when sending a Bluetooth Mesh message, the same message is sent with a preset transmission interval and a preset number of transmissions.

[0003] However, in the process of data transmission using the retransmission mechanism, there is a problem of high power consumption of electronic devices. Summary of the invention

[0004] The embodiments of the present application provide a data transmission method, device, electronic device and storage medium, which can solve the problem of high power consumption of electronic devices in the process of data transmission using a retransmission mechanism.

[0005] In a first aspect, an embodiment of the present application provides a data transmission method, which is applied to a first electronic device, where the first electronic device is a device that supports the Bluetooth Mesh protocol. The method includes: sending a data packet via Bluetooth broadcast according to a target transmission parameter, where the target transmission parameter includes a target transmission interval and a target transmission number; when a confirmation message replied by a second electronic device is scanned, stopping sending the data packet, where the confirmation message replied by the second electronic device indicates that the second electronic device has successfully received the data packet sent by the first electronic device, and the second electronic device is a device that supports the Bluetooth Mesh protocol.

[0006] The data transmission method provided in the first aspect, when scanning the confirmation information replied by the second electronic device, the first electronic device confirms that the second electronic device has successfully received the data packet sent by the first electronic device, and there is no need to send the remaining data packets, and the sending of data packets can be stopped, thereby reducing the number of data packets sent by the first electronic device, thereby saving the power consumption of the first electronic device.

[0007] In a possible implementation of the first aspect, the method also includes: acquiring first historical data of the first electronic device; the first historical data includes: the number of transmission parameters used in the process of sending data packets within a first preset time, and the corresponding number of transmissions when confirmation information is received when sending data packets using each set of transmission parameters; determining the target transmission parameters based on the preset transmission parameters and the first historical data, the preset transmission parameters including a preset transmission interval and a preset number of transmissions.

[0008] In this implementation, the target transmission parameters are dynamically adjusted according to the first historical data and preset transmission parameters, so that the first electronic device sends data according to the target transmission parameters to reduce the number of times the data packets are sent as much as possible, thereby reducing the power consumption of the first electronic device.

[0009] In a possible implementation of the first aspect, the target transmission parameters are determined based on preset transmission parameters and first historical data, including: determining a preset transmission interval as the target transmission interval; determining the target transmission number based on the number of transmission parameters used in the process of sending data packets, and the corresponding number of transmissions when a confirmation message is received when sending data packets using each set of transmission parameters, or determining the target transmission number based on the number of transmission parameters used in the process of sending data packets, and the corresponding number of transmissions when a confirmation message is received when sending data packets using each set of transmission parameters, and the preset number of transmissions.

[0010] In this implementation, the specific method for determining the target transmission parameters is clarified, making the determined target transmission parameters more accurate. Therefore, in the process of the first electronic device sending data packets according to the target transmission parameters, the number of times data packets are sent is effectively reduced, the efficiency of data transmission is improved, and the power consumption of the first electronic device is reduced.

[0011] In a possible implementation manner of the first aspect, the method further includes: starting scanning after a target delayed scanning time period, where the start time of the target delayed scanning time period is a time point when the data packet starts to be sent.

[0012] In this implementation, scanning is started after a target delayed scanning time period from the moment when the data packet starts to be sent, thereby reducing the scanning time of the first electronic device and the power consumption of the first electronic device.

[0013] In a possible implementation manner of the first aspect, the method further includes: determining a preset delayed scanning time period as a target delayed scanning time period, and a start time of the preset delayed scanning time period is a time point when the data packet starts to be sent.

[0014] In this implementation, the preset delayed scanning time period is determined as the target delayed scanning time period, so that the first electronic device starts scanning after the preset delayed scanning time period, which reduces the scanning time of the first electronic device and reduces the power consumption of the first electronic device.

[0015] In a possible implementation of the first aspect, the method also includes: acquiring second historical data of the first electronic device, the second historical data including: the number of transmission parameters used in the process of sending data packets within a second preset time, the number of transmissions corresponding to the receipt of confirmation information when sending data packets using each set of transmission parameters, and the transmission interval corresponding to sending data packets using each set of transmission parameters; determining a target delayed scanning time period according to the number of transmission parameters used in the process of sending data packets, the number of transmissions corresponding to the receipt of confirmation information when sending data packets using each set of transmission parameters, and the transmission interval corresponding to sending data packets using each set of transmission parameters, or determining a target delayed scanning time period according to the number of transmission parameters used in the process of sending data packets, the number of transmissions corresponding to the receipt of confirmation information when sending data packets using each set of transmission parameters, the transmission interval corresponding to sending data packets using each set of transmission parameters, and a preset delayed scanning time period, the start time of the preset delayed scanning time period being the moment when sending data packets starts.

[0016] In this implementation, the specific method for determining the target delayed scanning time period is clarified, so that the determined target delayed scanning time period is more accurate, so that the first electronic device starts scanning after the preset delayed scanning time period, reducing the scanning time of the first electronic device and reducing the power consumption of the first electronic device.

[0017] In a possible implementation manner of the first aspect, the method further includes: when confirmation information replied by the second electronic device is scanned, stopping scanning for confirmation information replied by the second electronic device.

[0018] In this implementation, when the confirmation information replied by the second electronic device is scanned, the first electronic device can confirm that the second electronic device has successfully received the data packet and there is no need to continue scanning the confirmation information replied by the second electronic device. At this time, scanning the confirmation information replied by the second electronic device is stopped, thereby reducing unnecessary scanning and thus reducing the power consumption of the first electronic device.

[0019] In a second aspect, an embodiment of the present application provides a data transmission device, including:

[0020] A sending unit, used to send a data packet through Bluetooth broadcast according to a target transmission parameter, wherein the target transmission parameter includes a target transmission interval and a target transmission number;

[0021] The control unit is used to stop sending data packets when scanning the confirmation information replied by the second electronic device, the confirmation information replied by the second electronic device indicates that the second electronic device successfully receives the data packet sent by the sending unit, and the second electronic device is a device supporting the Bluetooth Mesh protocol.

[0022] In a third aspect, an embodiment of the present application provides an electronic 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 method of any one of the first aspects described above is implemented.

[0023] In a fourth aspect, 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 data transmission method of any one of the above-mentioned first aspects.

[0024] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the data transmission methods of the first aspect.

[0025] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying any creative work.

[0027] Figure 1 This is a schematic diagram of data transmission under the Bluetooth Mesh protocol provided in an embodiment of the present application.

[0028] Figure 2 This is a schematic diagram of an example of a communication system architecture applicable to the present application provided in an embodiment of the present application.

[0029] Figure 3 It is a flowchart of a data transmission method provided in an embodiment of the present application.

[0030] Figure 4 This is a data transmission diagram based on a data transmission method provided in an embodiment of the present application.

[0031] Figure 5 It is a structural diagram of a data transmission device provided in an embodiment of the present application.

[0032] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also 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 prevent unnecessary details from obstructing the description of the present application.

[0034] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0035] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0036] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0037] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0038] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0039] The following is a description of the related technologies of the embodiments of the present application.

[0040] Bluetooth Low Energy (BLE) technology is a wireless communication technology developed based on traditional Bluetooth technology and is specifically designed for low-cost, low-bandwidth, and low-power Internet of Things (IoT) devices.

[0041] BLE devices refer to devices that support BLE technology. As a transmitter, a BLE device sends signals in low-power broadcast mode, namely BLE broadcast signals. As a receiver, a BLE device receives BLE broadcast signals in scanning mode. When the receiving device scans the BLE broadcast signal, the receiving device sends a connection request to the transmitter to establish a communication connection between the two devices.

[0042] Bluetooth Mesh, or Bluetooth mesh, is a Bluetooth network topology that allows multiple Bluetooth devices to connect to each other and work together to create a scalable, self-organizing network.

[0043] Bluetooth Mesh technology is a networking technology that can provide many-to-many transmission capabilities between devices. Bluetooth Mesh technology is based on the physical layer and link layer of low-power Bluetooth. The Bluetooth Mesh protocol layer is established on top of the physical layer and link layer of low-power Bluetooth. In the Bluetooth Mesh protocol layer, communication between Bluetooth Mesh devices is achieved through broadcast and scanning mechanisms, and each Bluetooth Mesh device can send messages as a broadcaster or receive messages as a scanner. This broadcast and scanning method allows Bluetooth Mesh devices to communicate without establishing complex connections, thereby improving the flexibility and efficiency of communication and solving the problems of BLE devices being unable to communicate, limited transmission distance, and unable to form large-scale networks.

[0044] The Bluetooth Mesh protocol is a network protocol based on BLE technology that allows devices to communicate in the form of a mesh network, thereby achieving reliable transmission between devices and a wide coverage range.

[0045] Bluetooth Mesh devices refer to devices that support Bluetooth Mesh technology or Bluetooth Mesh protocol, also known as Bluetooth Mesh network devices or Bluetooth Mesh nodes. Bluetooth Mesh devices implement many-to-many communication mainly based on BLE broadcast messages for data transmission, and message transmission between Bluetooth Mesh devices is achieved by adding source address, destination address and Bluetooth Mesh protocol data to BLE broadcast messages.

[0046] During the data transmission between Bluetooth Mesh devices, packets are sent in the form of BLE broadcast. Since the communication mechanism of BLE broadcast is relatively simple, during the broadcast communication process, the Bluetooth Mesh device as the receiving device will not send confirmation information or acknowledgment character (ACK) to the Bluetooth Mesh device as the sending end to indicate that the BLE broadcast message has been successfully received, so the Bluetooth Mesh device as the sending end cannot determine whether the packet is successfully sent. Therefore, the BLE broadcast message itself is not a message with a reliable delivery mechanism, and the transmission of the message link layer of Bluetooth Mesh is therefore unreliable.

[0047] In order to improve the success rate of a single packet transmission, the Bluetooth Mesh protocol specifies a retransmission mechanism for the data transmission process. Figure 1 Figure 2 shows a schematic diagram of data transmission under the Bluetooth Mesh protocol. Figure 1As shown, when the first electronic device detects a certain event, the event reporting state is triggered, so that the first electronic device starts to report an event to the second electronic device according to the retransmission mechanism of the data transmission process specified in the Bluetooth Mesh protocol. After the first transmission, the second transmission is performed at a time interval corresponding to the time interval between message retransmissions (Transmission interval), and then each time interval corresponds to the time of the Transmission interval, until the retransmission count (Retransmit Count) transmissions are performed to end the reporting of this event; when a certain event is detected again, the event reporting state is triggered again, and the event is still reported according to the retransmission mechanism of the data transmission process specified in the Bluetooth Mesh protocol. In other words, the data transmission of a single reporting event under the Bluetooth Mesh protocol is: after the event reporting state is triggered, Retransmit Count+1 identical messages are transmitted at a time interval corresponding to the Transmission interval. Exemplarily, Transmission interval = (Network Retransmit Interval Steps + 1) * 10ms, where Network Retransmit IntervalSteps is a parameter related to message retransmission in the Bluetooth Mesh network, which is used to define the time interval Transmission interval between message retransmissions, and Retransmit Count and Network Retransmit Interval Steps can be default configurations or actively configured by the gateway. In order to ensure the transmission success rate, the electronic devices currently on the market usually take the value of Retransmit Count as 5 and the value of Network Retransmit Interval Steps as 1. At this time, it takes 5*20=100ms to transmit an event. During these 100ms, the receiving window needs to be always open and scan continuously to receive replies that may be sent by the second electronic device. In existing Bluetooth Mesh products, this retransmission mechanism is commonly used for multiple retransmissions. The above-mentioned first electronic device can be a Bluetooth Mesh device, and the second electronic device can be a Bluetooth gateway.

[0048] The following describes this retransmission mechanism based on common packet transmission parameters. Specifically, a Bluetooth Mesh device as a transmitter needs to send the same message six times at an interval of 20ms to send an application message. Six packets are sent during the duration, and scanning needs to be turned on to receive the reply from the other end (i.e., the receiving Bluetooth Mesh device). In the packet transmission method specified by the Bluetooth Mesh protocol, that is, the method of sending messages using the retransmission mechanism, there are the following two problems:

[0049] On the one hand, if the Bluetooth Mesh device (for example, the first electronic device) as the sender receives a reply from the other end (for example, the second electronic device) after any packet transmission before the sixth packet transmission, it means that the other end has received the current message and does not need to send the remaining messages. If the remaining messages are sent, it is redundant. However, the remaining messages must be sent according to the preset number of retransmissions specified in the Bluetooth Mesh protocol until the preset number of retransmissions is reached, which significantly increases the packet transmission power consumption of the Bluetooth Mesh device as the sender. For example: if the Bluetooth Mesh device as the sender receives a reply from the other end after the third packet transmission, then according to the Bluetooth Mesh protocol, it needs to continue to send the remaining three packets, which means that the packet transmission power consumption of the remaining three packets is increased.

[0050] On the other hand, since the peer end needs a certain amount of time to process the received message after receiving the message, it will not reply to the sending Bluetooth Mesh device during the processing of the received message, which makes the scanning time of the sending Bluetooth Mesh device in the early stage of the packet sending stage (that is, the time period when the reply message from the peer end is not received) wasted. For example: if the time for the receiving Bluetooth Mesh device to process the message exceeds 60ms, and the sending Bluetooth Mesh device sends messages at intervals of 20ms, then the sending Bluetooth Mesh device can send three messages in 60ms, and when these three messages are sent, the peer end has not yet processed the first message and will not reply to the sender. Since the sender cannot receive the reply from the peer end within the time of sending these three messages, it is redundant to start scanning the signal sent by the peer end within the time of sending these three messages, which wastes the scanning power consumption of the sender.

[0051] In view of this, an embodiment of the present application provides a data transmission method, which is applied to a first electronic device supporting the Bluetooth Mesh protocol, and the data transmission method includes: sending a data packet through Bluetooth broadcast according to a target transmission parameter, the target transmission parameter includes a target transmission interval and a target transmission number; when a confirmation message replied by a second electronic device is scanned, the sending of the data packet is stopped, and the confirmation message replied by the second electronic device indicates that the second electronic device has successfully received the data packet sent by the first electronic device, and the second electronic device is a device supporting the Bluetooth Mesh protocol. By adding to the retransmission mechanism specified by Bluetooth Mesh: stopping sending data packets when the confirmation message replied by the second electronic device is scanned, the number of data packets sent by the first electronic device is reduced, thereby saving the power consumption of the first electronic device.

[0052] The data transmission method provided by this application will be described in detail below.

[0053] Figure 2 The figure is a schematic diagram of a communication system architecture applicable to an embodiment of the present application, such as Figure 2 As shown, the communication system includes: at least two electronic devices, at least two electronic devices support the Bluetooth Mesh protocol, and can receive and send messages in the Bluetooth Mesh network. Among them, at least two electronic devices communicate with each other through a wireless connection (such as Bluetooth (BLE), 2.4G communication, wireless fidelity (wireless fidelity, Wi-Fi) network, near field communication technology (near field communication, NFC), infrared technology (infrared, IR), etc.), and the embodiments of the present application are not limited here.

[0054] It should be understood that Figure 2 The system architecture shown does not constitute a specific limitation on the communication system architecture applicable to the present application. Figure 2 The embodiments of the present application are not limited to the more or fewer components shown, or different components, etc.

[0055] For example, the embodiments of the present application can also be applied to smart home systems, sensor network systems, etc., thereby helping to reduce the power consumption of the smart home systems or sensor network systems.

[0056] Combine the following Figure 3 The data transmission method provided in the embodiment of the present application is described with reference to Figure 3 , Figure 3A schematic flowchart of a data transmission method provided in an embodiment of the present application is shown. As an example but not a limitation, the method can be applied to a first electronic device, which is a device supporting the Bluetooth Mesh protocol.

[0057] like Figure 3 As shown, the method includes S310 and S320:

[0058] S310: The first electronic device sends a data packet via Bluetooth broadcast according to target transmission parameters.

[0059] The target transmission parameters include the target transmission interval and the target transmission times. The target transmission interval is used to indicate the interval between the transmission times of two consecutively transmitted data packets, and the target transmission times is used to indicate the number of times the data packet needs to be transmitted after the event state is triggered. The data packet includes the Bluetooth Mesh message.

[0060] In a possible implementation, the first electronic device sends at least one data packet to at least one second electronic device via Bluetooth broadcast according to the target transmission interval and the target transmission number.

[0061] Optionally, the embodiment of the present application needs to determine the target transmission parameters before S310. As a possible implementation method, the first electronic device may determine the preset transmission parameters as the target transmission parameters. As another possible implementation method, the first electronic device may determine the target transmission parameters based on historical data of data packets sent by the first electronic device. As a possible implementation method, the first electronic device may also determine the target transmission parameters based on preset transmission parameters and historical data of data packets sent by the first electronic device.

[0062] These three methods will be described below.

[0063] In an embodiment of the present application, as a possible implementation manner, the step of determining the target transmission parameter includes:

[0064] A preset transmission parameter is obtained, and the preset transmission parameter is determined as a target transmission parameter.

[0065] The preset transmission parameters include a preset transmission interval and a preset number of transmissions.

[0066] In the embodiment of the present application, the preset transmission parameters are parameters predetermined according to the Bluetooth Mesh protocol.

[0067] It can be understood that determining the preset transmission parameter as the target transmission parameter includes: determining the preset transmission interval as the target transmission interval, and determining the preset number of transmissions as the target number of transmissions.

[0068] In the embodiment of the present application, as another possible implementation, the step of determining the target transmission parameter includes S310a1 and S310a2:

[0069] S310a1. The first electronic device obtains first historical data of the first electronic device.

[0070] Among them, the first historical data of the first electronic device includes: the number of transmission parameters used in the process of sending data packets within the first preset time, the number of transmissions corresponding to receiving confirmation information when sending data packets using each set of transmission parameters, and the transmission interval of each set of transmission parameters.

[0071] In the embodiment of the present application, the first electronic device can read the historical data of the first electronic device from the memory in the first electronic device, or obtain the historical data of the first electronic device from an external storage device that stores the historical data of the first electronic device.

[0072] It should be noted that the correlation between the historical data within the first preset time and the target transmission parameter is higher, and the accuracy of the target transmission parameter determined using the historical data within the first preset time is higher. The first preset time can be determined according to the configuration of the first electronic device, etc. For example, the first preset time can be 20 minutes, 1 hour, etc. Preferably, the first preset time is 30 minutes.

[0073] It should be noted that the historical data before the first preset time may be discarded.

[0074] S310a2: The first electronic device determines a target transmission parameter according to historical data of the first electronic device.

[0075] Specifically, the target transmission interval is determined according to the transmission interval of each group of transmission parameters. The transmission interval of each group of transmission parameters may be the same or different. Exemplarily, when the transmission interval of each group of transmission parameters is the same, the transmission interval of each group of transmission parameters is used as the target transmission interval. When the transmission interval of each group of transmission parameters is different, the target transmission interval is determined according to the number of transmission parameters used in the process of sending a data packet within the first preset time and the transmission interval of each group of transmission parameters. For example, according to the number of transmission parameters used in the process of sending a data packet within the first preset time and the transmission interval of each group of transmission parameters, the average value of the transmission interval of each group of transmission parameters is determined as the target transmission interval. Alternatively, when the transmission interval of each group of transmission parameters is different, a weighted value may be set for the transmission interval of each group of transmission parameters, and the target transmission interval may be determined according to the transmission interval of each group of transmission parameters and the weighted value corresponding to the transmission interval of each group of transmission parameters. It can be understood that the embodiments of the present application may adopt other methods of determining the target transmission interval according to the transmission interval of each group of transmission parameters, which are not limited in the present application.

[0076] Specifically, the target number of transmissions is determined according to the number of transmission parameters used in the process of sending data packets within the first preset time, and the number of transmissions corresponding to receiving confirmation information when sending data packets using each set of transmission parameters. Exemplarily, according to the number of transmission parameters used in the process of sending data packets within the first preset time, and the number of transmissions corresponding to receiving confirmation information when sending data packets using each set of transmission parameters, the average value of the number of transmissions corresponding to receiving confirmation information when sending data packets using each set of transmission parameters is determined as the target number of transmissions.

[0077] Exemplarily, the target transmission times satisfies the following formula:

[0078]

[0079] In formula (1), N represents the target number of transmissions; n represents the number of transmission parameters used in the process of sending data packets within the first preset time; N1 represents the number of transmissions corresponding to the receipt of confirmation information when the data packet is sent using the first set of transmission parameters; N2 represents the number of transmissions corresponding to the receipt of confirmation information when the data packet is sent using the second set of transmission parameters; and Nn represents the number of transmissions corresponding to the receipt of confirmation information when the data packet is sent using the nth set of transmission parameters.

[0080] It can be understood that the value of N1+N2+…+Nn is used to indicate the congestion of the network. The target transmission times obtained according to formula (1), that is, the smaller the average transmission times, the cleaner the network environment is. It can also be said that the network can efficiently, stably and securely transmit data packets, and the transmission times of the next data packet transmission can be reduced. Otherwise, it means that the network environment is seriously disturbed and the data packets cannot be transmitted stably and securely, and the next data packet transmission requires more transmission times.

[0081] In the embodiment of the present application, as another possible implementation, the method further includes: S310b1 and S310b2:

[0082] S310b1. Acquire first historical data of the first electronic device.

[0083] The first historical data includes: the number of transmission parameters used in the process of sending data packets within the first preset time, and the number of transmissions corresponding to the receipt of confirmation information when sending data packets using each set of transmission parameters. The specific process of S310b1 is similar to the specific description in S310a1, and will not be repeated here for the sake of brevity.

[0084] S310b2. Determine target transmission parameters according to preset transmission parameters and first historical data.

[0085] The preset transmission parameters include a preset transmission interval and a preset number of transmissions.

[0086] Optionally, in the embodiment of the present application, specific implementation steps of the above S310b2 are also provided, and S310b2 includes S310b21 and S310b22:

[0087] S310b21. Determine the preset transmission interval as the target transmission interval.

[0088] S310b22. Determine the target transmission number according to the number of transmission parameters used in the process of sending data packets, and the corresponding number of transmissions when confirmation information is received when sending data packets using each set of transmission parameters, or determine the target transmission number according to the number of transmission parameters used in the process of sending data packets, and the corresponding number of transmissions when confirmation information is received when sending data packets using each set of transmission parameters, and the preset number of transmissions.

[0089] Among them, the specific process of determining the target transmission number is similar to the specific description of determining the target transmission number in S310a2, and for the sake of brevity, it will not be repeated here.

[0090] Exemplarily, based on the number of transmission parameters used in the process of sending data packets, the number of transmissions corresponding to when confirmation information is received when sending data packets using each set of transmission parameters, and the preset number of transmissions, a weighted average of the number of transmissions corresponding to when confirmation information is received when sending data packets using each set of transmission parameters and the preset number of transmissions is determined as the target number of transmissions.

[0091] For example, the target transmission times satisfies the following formula:

[0092]

[0093] In formula (2), N represents the target number of transmissions; n represents the number of transmission parameters used in the process of sending a data packet within the first preset time; N0 represents the preset number of transmissions; N1 represents the number of transmissions corresponding to the receipt of confirmation information when a data packet is sent using the first set of transmission parameters; N2 represents the number of transmissions corresponding to the receipt of confirmation information when a data packet is sent using the second set of transmission parameters; and Nn represents the number of transmissions corresponding to the receipt of confirmation information when a data packet is sent using the nth set of transmission parameters.

[0094] S320: When the first electronic device scans and receives confirmation information replied by the second electronic device, it stops sending the data packet.

[0095] The second electronic device is a device supporting the Bluetooth Mesh protocol. The confirmation information replied by the second electronic device indicates that the second electronic device successfully receives the data packet sent by the first electronic device.

[0096] In an embodiment of the present application, after sending a data packet, the first electronic device continues to scan for confirmation information replied by the second electronic device. If the confirmation information replied by the second electronic device is not scanned or received, and the number of transmissions of the data packet has not reached the target transmission number, the first electronic device will continue to send the data packet to the second electronic device according to the target transmission parameters. If the first electronic device scans the confirmation information replied by the second electronic device, the first electronic device confirms that the second electronic device has successfully received the data packet sent by the first electronic device. At this time, the first electronic device stops sending data packets, that is, it no longer sends data packets to the second electronic device according to the target transmission parameters.

[0097] Optionally, due to air interface conflicts and protocol stack response time in the communication system, the first electronic device is unlikely to receive a confirmation message from the second electronic device within a period of time after sending a data packet. If the first electronic device performs scanning within the period of time when it cannot receive a confirmation message from the second electronic device, it will cause the first electronic device to generate excess power consumption. Therefore, in some embodiments, the power consumption of the first electronic device can be reduced by reducing the time the first electronic device scans before receiving a confirmation message from the second electronic device.

[0098] Exemplarily, in some embodiments, the first electronic device may start scanning after a target delayed scanning time period.

[0099] The start time of the target delayed scanning time period is the time when the data packet starts to be sent.

[0100] In a possible implementation, the first electronic device is in a dormant state during the target delayed scanning time after sending a data packet, thereby further reducing the power consumption required by the first electronic device during a packet sending process.

[0101] It is understandable that the first electronic device does not start scanning when it starts sending the data packet, but starts scanning from the moment the data packet is sent after a time corresponding to the target delayed scanning time period has passed, thereby leaving time for the second electronic device to receive and process the data packet and reply a confirmation message to the first electronic device.

[0102] It should be noted that even if the second electronic device replies with a confirmation message to the first electronic device within the target delayed scanning time period, the first electronic device starts scanning after the target delayed scanning time period, resulting in the first electronic device not receiving the confirmation message replied by the second electronic device. Since the first electronic device does not receive the confirmation message replied by the second electronic device, it still sends data packets according to the target transmission parameters. Therefore, after the first electronic device starts scanning, it can still receive the confirmation message replied by the second electronic device.

[0103] In the embodiment of the present application, the target delayed scanning time period can be determined by the following two methods. The following describes these two methods in detail.

[0104] In a possible implementation manner, a preset delayed scanning time period may be determined as a target delayed scanning time period.

[0105] The start time of the preset delayed scanning time period is the moment when the first electronic device starts to send a data packet.

[0106] As an example and not limitation, the preset delayed scanning time period can be tested under acceptable maximum interference conditions to determine the time it takes for the first electronic device to receive a confirmation message from the second electronic device in reply, and the most likely time it takes for the first electronic device to receive the confirmation message from the second electronic device, or the average of the maximum and minimum time it takes for the first electronic device to receive the confirmation message from the second electronic device in reply, can be determined as the preset delayed scanning time; alternatively, a number of milliseconds can be added to the most likely time it takes for the first electronic device to receive the confirmation message from the second electronic device in reply as the preset delayed scanning time.

[0107] It should be noted that the maximum acceptable interference situation can be determined by multiple factors, including but not limited to: network congestion environment, network signal interference, electronic equipment failure, etc.

[0108] In another possible implementation, the step of determining the target delayed scanning time period includes S31 and S32:

[0109] S31. Acquire second historical data of the first electronic device.

[0110] Among them, the second historical data includes: the number of transmission parameters used in the process of sending data packets within the second preset time, the corresponding number of transmissions when receiving confirmation information when sending data packets using each set of transmission parameters, and the corresponding transmission interval when sending data packets using each set of transmission parameters.

[0111] In an embodiment of the present application, the second preset time may be the same as the first preset time, or may be different from the second preset time, and the present application does not limit this.

[0112] It can be understood that the specific implementation process of S31 is similar to the specific description of obtaining the first historical data of the first electronic device, and for the sake of brevity, it is not repeated here.

[0113] S32. Determine the target delayed scanning time period according to the number of transmission parameters used in the process of sending data packets, the number of transmissions corresponding to the receipt of confirmation information when sending data packets using each set of transmission parameters, and the transmission interval corresponding to sending data packets using each set of transmission parameters, or determine the target delayed scanning time period according to the number of transmission parameters used in the process of sending data packets, the number of transmissions corresponding to the receipt of confirmation information when sending data packets using each set of transmission parameters, the transmission interval corresponding to sending data packets using each set of transmission parameters, and the preset delayed scanning time period.

[0114] The start time of the preset delayed scanning time period is the moment when the data packet starts to be sent.

[0115] Exemplarily, the target delayed scanning time period satisfies the following formula:

[0116]

[0117] In formula (3), D(n+1) represents the target delayed scanning time; n represents the number of transmission parameters used in the process of sending data packets within the second preset time; D0 represents the preset delayed scanning time; N1 represents the number of corresponding sent data packets when the confirmation information replied by the second electronic device is received during the first data transmission within the second preset time; T1 represents the transmission interval of sending data packets during the first data transmission within the second preset time; N2 represents the number of corresponding sent data packets when the confirmation information replied by the second electronic device is received during the second data transmission within the second preset time; T2 represents the transmission interval of sending data packets during the second data transmission within the second preset time; Nn represents the number of corresponding sent data packets when the confirmation information replied by the second electronic device is received during the nth data transmission within the second preset time; Tn represents the transmission interval of sending data packets during the nth data transmission within the second preset time.

[0118] Exemplarily, the target delayed scanning time period satisfies the following formula:

[0119]

[0120] In formula (4), D(n+1) represents the target delayed scanning time; n represents the number of times the first electronic device performs data transmission within the second preset time; D0 represents the preset delayed scanning time; N1 represents the number of data packets sent corresponding to the confirmation information replied by the second electronic device during the first data transmission within the second preset time; T1 represents the transmission interval of data packets sent during the first data transmission within the second preset time; N2 represents the number of data packets sent corresponding to the confirmation information replied by the second electronic device during the second data transmission within the second preset time; T2 represents the transmission interval of data packets sent during the second data transmission within the second preset time; Nn represents the number of data packets sent corresponding to the confirmation information replied by the second electronic device during the nth data transmission within the second preset time; Tn represents the transmission interval of data packets sent during the nth data transmission within the second preset time.

[0121] Optionally, in order to further reduce the power consumption of data transmission of the first electronic device, the embodiment of the present application stops scanning the confirmation information replied by the second electronic device when the confirmation information replied by the second electronic device is scanned.

[0122] It can be understood that when the first electronic device scans the confirmation information replied by the second electronic device, the first electronic device can already confirm that the second electronic device has successfully received the data packet broadcast by the first electronic device, and there is no need to confirm again whether the second electronic device has successfully received the data packet broadcast by the first electronic device. Therefore, when the confirmation information replied by the second electronic device is scanned, there is no need to scan the confirmation information replied by the second electronic device again, and scanning of the confirmation information replied by the second electronic device can be stopped, thereby reducing unnecessary scanning of the first electronic device and further reducing the power consumption of the first electronic device during data transmission.

[0123] The present application provides a data transmission schematic diagram based on a data transmission method, such as Figure 4 As shown, after the first electronic device triggers the event reporting status, the first electronic device starts to transmit data packets to the second electronic device. After a delay, the first electronic device starts to scan the confirmation information replied by the second electronic device. After the first electronic device transmits the data packet to the second electronic device for the nth time (not reaching the preset number of transmissions), the first electronic device receives the confirmation information replied by the second electronic device and immediately stops sending packets (transmitting data packets) and scanning the confirmation information replied by the second electronic device.

[0124] It can be understood that the embodiment of the present application provides a data transmission method, which reduces the number of data packets sent by the first electronic device by adding the following to the retransmission mechanism specified by Bluetooth Mesh: stopping sending data packets when scanning confirmation information replied by the second electronic device, thereby saving power consumption of the first electronic device in the process of sending data packets, reducing the traffic used in the data transmission process, and reducing the possibility of network congestion.

[0125] 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 the present application.

[0126] Corresponding to the data transmission method of the above embodiment, Figure 5 A structural block diagram of a data transmission device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0127] Reference Figure 5 , the data transmission device 500 includes: a sending unit 510 and a control unit 520, wherein:

[0128] A sending unit 510, configured to send a data packet via Bluetooth broadcast according to a target transmission parameter, wherein the target transmission parameter includes a target transmission interval and a target transmission number;

[0129] The control unit 520 is used to stop sending data packets when scanning the confirmation information replied by the second electronic device. The confirmation information replied by the second electronic device indicates that the second electronic device successfully receives the data packet sent by the sending unit 510. The second electronic device is a device supporting the Bluetooth Mesh protocol.

[0130] An embodiment of the present application provides a data transmission device, which reduces the number of data packets sent by the data transmission device by adding the following to the retransmission mechanism specified by Bluetooth Mesh: stopping sending data packets when confirmation information replied by a second electronic device is scanned, thereby saving power consumption of the data transmission device in the process of sending data packets, reducing the traffic used in the data transmission process, and reducing the possibility of network congestion.

[0131] Optionally, in a possible implementation, the data transmission device 500 further includes: an acquisition unit and a determination unit, wherein:

[0132] An acquisition unit, configured to acquire first historical data of the first electronic device; the first historical data includes: the number of transmission parameters used in the process of sending a data packet within a first preset time, and the number of transmissions corresponding to receiving confirmation information when sending a data packet using each set of transmission parameters;

[0133] The determination unit is used to determine the target transmission parameter according to the preset transmission parameter and the first historical data, wherein the preset transmission parameter includes a preset transmission interval and a preset number of transmissions.

[0134] Optionally, in a possible implementation manner, the determining unit is specifically configured to determine a preset transmission interval as a target transmission interval.

[0135] The determination unit is further specifically used to: determine the target transmission number according to the number of transmission parameters used in the process of sending the data packet, and the corresponding number of transmissions when the confirmation information is received when the data packet is sent using each set of transmission parameters, or determine the target transmission number according to the number of transmission parameters used in the process of sending the data packet, and the corresponding number of transmissions when the confirmation information is received when the data packet is sent using each set of transmission parameters, and the preset number of transmissions.

[0136] Optionally, in a possible implementation, the data transmission device 500 further includes: a start scanning unit, configured to start scanning after a target delayed scanning time period, and the start time of the target delayed scanning time period is the moment when the data packet starts to be sent.

[0137] Optionally, in a possible implementation, the determining unit is further configured to determine a preset delayed scanning time period as a target delayed scanning time period, and a start time of the preset delayed scanning time period is a moment when sending a data packet starts.

[0138] Optionally, in a possible implementation, the acquisition unit is further used to acquire second historical data of the first electronic device, where the second historical data includes: the number of transmission parameters used in the process of sending data packets within the second preset time, the number of transmissions corresponding to when receiving confirmation information when sending data packets using each set of transmission parameters, and the transmission interval corresponding to sending data packets using each set of transmission parameters;

[0139] The determination unit is further used to determine the target delayed scanning time period according to the number of transmission parameters used in the process of sending data packets, the number of transmissions corresponding to the receipt of confirmation information when sending data packets using each set of transmission parameters, and the transmission interval corresponding to sending data packets using each set of transmission parameters, or to determine the target delayed scanning time period according to the number of transmission parameters used in the process of sending data packets, the number of transmissions corresponding to the receipt of confirmation information when sending data packets using each set of transmission parameters, the transmission interval corresponding to sending data packets using each set of transmission parameters, and a preset delayed scanning time period, wherein the start time of the preset delayed scanning time period is the moment when sending data packets starts.

[0140] Optionally, in a possible implementation, the data transmission device 500 further includes: a scanning stop unit, configured to stop scanning for confirmation information replied by the second electronic device when confirmation information replied by the second electronic device is scanned.

[0141] It should be understood that the specific process of each unit in the data transmission device 500 executing the above corresponding steps can be found in the description of the data transmission method in the previous text. For the sake of brevity, it is not repeated here.

[0142] An embodiment of the present application also provides an electronic device 600. Figure 6 As shown, the electronic device 600 of this embodiment includes: a processor 610, a memory 620, and a computer program 630 stored in the memory 620 and executable on the processor 610. The computer program 630 can be executed by the processor 610 to generate instructions, and the processor 610 can implement the steps in the above-mentioned various data transmission method embodiments according to the instructions. Alternatively, when the processor 610 executes the computer program 630, the functions of each module / unit in the above-mentioned various device embodiments are implemented, such as Figure 5 The functions of the sending unit 510 to the control unit 520 are shown.

[0143] Exemplarily, the computer program 630 may be divided into one or more modules / units, one or more modules / units are stored in the memory 620, and are executed by the processor 610 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 630 in the electronic device 600.

[0144] Those skilled in the art will understand that Figure 6 This is only an example of the electronic device 600 and does not constitute a limitation of the electronic device 600. The electronic device 600 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 600 may also include input and output devices, network access devices, buses, etc.

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

[0146] The memory 620 may be an internal storage unit of the electronic device 600, such as a hard disk or memory of the electronic device 600. The memory 620 may also be an external storage device of the electronic device 600, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 600. Further, the memory 620 may also include both an internal storage unit of the electronic device 600 and an external storage device. The memory 620 is used to store computer programs and other programs and data required by the electronic device 600. The memory 620 may also be used to temporarily store data that has been output or is to be output.

[0147] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be 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 in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in 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, which will not be repeated here.

[0148] The embodiment of the present application also provides a computer-readable storage medium, in which a computer program or instruction is stored, and when the computer reads and executes the computer program or instruction, the computer executes the steps in the above-mentioned various method embodiments. The readable storage medium can be a read-only memory (ROM) or a random access memory (RAM), which is not limited in the embodiment of the present application.

[0149] Exemplarily, the computer program or instructions in the computer-readable storage medium are implemented using aspect-oriented programming techniques.

[0150] An embodiment of the present application provides a computer program product. When the computer program product runs on a server, the server can implement the steps in the above-mentioned method embodiments when executing the server.

[0151] The present application also provides a chip, which includes: a processing unit and a communication unit, wherein the processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit, etc. The processing unit may execute computer instructions to enable the electronic device to execute any of the data transmission methods provided in the above-mentioned embodiments of the present application.

[0152] Optionally, the computer instructions are stored in a storage unit.

[0153] Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip in the terminal, such as a ROM or other types of static storage devices that can store static information and instructions, random RAM, etc. Among them, the processor mentioned in any of the above can be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the display of the above-mentioned electronic device and the execution of the program of the control method. The processing unit and the storage unit can be decoupled and respectively set on different physical devices, and connected by wired or wireless means to realize the respective functions of the processing unit and the storage unit, so as to support the system chip to realize the various functions in the above-mentioned embodiments. Alternatively, the processing unit and the memory can also be coupled on the same device.

[0154] It is understandable that the chip provided in the embodiment of the present application can be an integrated circuit for implementing any of the above-mentioned data transmission methods, and the main function of the chip is to execute the steps or processes defined in the data transmission method in the embodiment of the present application, that is, to implement the data transmission method in the embodiment of the present application by hardware. The computer-readable storage medium provided in the embodiment of the present application is mainly used to store a computer program, which, when executed, implements the steps or processes defined in any of the above-mentioned data transmission methods, that is, to implement the data transmission method in the embodiment of the present application in the form of computer software.

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

[0156] Those of ordinary skill 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 to be beyond the scope of this application.

[0157] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, 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.

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

[0159] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0160] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / server, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0161] The embodiments described above 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, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A data transmission method, characterized in that: Applied to a first electronic device, the first electronic device is a device supporting the Bluetooth Mesh protocol, including: Sending a data packet via Bluetooth broadcast according to target transmission parameters, wherein the target transmission parameters include a target transmission interval and a target transmission number; When confirmation information is scanned from a second electronic device, stop sending data packets. The confirmation information from the second electronic device indicates that the second electronic device has successfully received the data packet sent by the first electronic device. The second electronic device is a device that supports the Bluetooth Mesh protocol.

2. The method according to claim 1, characterized in that The method further comprises: Acquire first historical data of the first electronic device; the first historical data includes: the number of transmission parameters used in the process of sending data packets within a first preset time, and the number of transmissions corresponding to receiving confirmation information when sending data packets using each set of transmission parameters; The target transmission parameter is determined according to a preset transmission parameter and the first historical data, wherein the preset transmission parameter includes a preset transmission interval and a preset number of transmissions.

3. The method according to claim 2, characterized in that The determining the target transmission parameter according to the preset transmission parameter and the first historical data includes: Determining the preset transmission interval as the target transmission interval; The target transmission number is determined according to the number of transmission parameters used in the process of sending the data packets, and the corresponding number of transmissions when the confirmation information is received when the data packets are sent using each set of transmission parameters, or the target transmission number is determined according to the number of transmission parameters used in the process of sending the data packets, and the corresponding number of transmissions when the confirmation information is received when the data packets are sent using each set of transmission parameters, and the preset transmission number.

4. The method according to claim 1, characterized in that The method further comprises: The scanning is started after the target delayed scanning time period, and the start time of the target delayed scanning time period is the time when the data packet starts to be sent.

5. The method according to claim 4, characterized in that The method further comprises: A preset delayed scanning time period is determined as the target delayed scanning time period, and a start time of the preset delayed scanning time period is a time point when the data packet starts to be sent.

6. The method according to claim 4, characterized in that The method further comprises: Acquire second historical data of the first electronic device, the second historical data comprising: the number of transmission parameters used in the process of sending data packets within a second preset time, the number of transmissions corresponding to receiving confirmation information when sending data packets using each set of transmission parameters, and the transmission interval corresponding to sending data packets using each set of transmission parameters; The target delayed scanning time period is determined based on the number of transmission parameters used in the process of sending the data packet, the number of transmissions corresponding to when confirmation information is received when the data packet is sent using each set of transmission parameters, and the transmission interval corresponding to when the data packet is sent using each set of transmission parameters, or the target delayed scanning time period is determined based on the number of transmission parameters used in the process of sending the data packet, the number of transmissions corresponding to when confirmation information is received when the data packet is sent using each set of transmission parameters, the transmission interval corresponding to when the data packet is sent using each set of transmission parameters, and a preset delayed scanning time period, and the start time of the preset delayed scanning time period is the moment when the data packet starts to be sent.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the confirmation information replied by the second electronic device is scanned, the scanning of the confirmation information replied by the second electronic device is stopped.

8. A data transmission device, characterized in that: include: A sending unit, configured to send a data packet via Bluetooth broadcast according to a target transmission parameter, wherein the target transmission parameter includes a target transmission interval and a target transmission number; A control unit is used to stop sending data packets when scanning confirmation information replied by a second electronic device, the confirmation information replied by the second electronic device indicates that the second electronic device successfully receives the data packet sent by the sending unit, and the second electronic device is a device supporting the Bluetooth Mesh protocol.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Data transmission control method and electronic equipment

    CN119853871A

  • Data transmission control method and electronic device

    CN119853871B