A file transmission optimization method and device based on dynamic channel residual capacity sensing, electronic equipment and storage medium

By detecting the remaining capacity of the Bluetooth channel in real time and pushing data when conditions are met, the problem of slow speed in transmitting large files using low-power Bluetooth is solved, achieving more efficient data transmission.

CN122138146APending Publication Date: 2026-06-02SHENZHEN JIAYZ PHOTO IND LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN JIAYZ PHOTO IND LTD
Filing Date
2026-03-03
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing Bluetooth Low Energy technology is too slow when transferring large data files, resulting in a poor user experience.

Method used

By detecting the remaining capacity of the Bluetooth channel in real time, data transmission is optimized using the cache push cycle. Data is pushed only when the remaining channel capacity is greater than a certain amount, until no more data needs to be transmitted in the cache.

Benefits of technology

It significantly improves the speed of transferring large files via Bluetooth Low Energy, thus enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122138146A_ABST
    Figure CN122138146A_ABST
Patent Text Reader

Abstract

This invention discloses a file transfer optimization method, apparatus, electronic device, and storage medium based on dynamic channel remaining capacity awareness, relating to the field of data transmission technology. The main components include: determining the data to be transferred in response to a file transfer request sent by a data access device and reading the data into a transmission buffer; the data holding device is a Bluetooth Low Energy device and has established a Bluetooth connection with the data access device; real-time detection of channel remaining capacity based on a buffer push cycle; the channel remaining capacity is the remaining data capacity of the corresponding Bluetooth channel, and the buffer push cycle is less than the current Bluetooth communication cycle between the data access device and the data holding device; and when the channel remaining capacity is greater than a first data amount, pushing the first data amount of data to be transferred from the transmission buffer to the Bluetooth channel until the transmission buffer no longer contains the data to be transferred. This invention improves the transmission rate when transferring files via Bluetooth Low Energy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data interaction technology, and in particular to a file transfer optimization method, apparatus, electronic device, and storage medium based on dynamic channel remaining capacity awareness. Background Technology

[0002] With the maturity of Bluetooth Low Energy (BLE) technology and the widespread adoption of Bluetooth functionality in mobile phones, an increasing number of smart devices can be controlled via Bluetooth. BLE is widely used in smart device control due to its low cost and low power consumption. However, currently, BLE can only execute simple control commands. In scenarios requiring the transmission of large amounts of data, such as when a voice recorder needs to transmit audio to a mobile terminal, or when firmware upgrades are needed for smart wearable devices, the slow data transmission speed leads to a poor user experience. Summary of the Invention

[0003] This invention provides a file transfer optimization method, apparatus, electronic device, and storage medium based on dynamic channel remaining capacity awareness, which can improve the transfer rate when transferring files via Bluetooth Low Energy.

[0004] In a first aspect, embodiments of the present invention provide a file transfer optimization method based on dynamic channel remaining capacity awareness, applied to a file data holding device for a target file transfer, comprising: In response to a file transfer request sent by a data access device, the device determines the data to be transferred and reads the data to be transferred into a transmission buffer. The data holding device is a Bluetooth Low Energy device and has established a Bluetooth connection with the data access device. The remaining channel capacity is detected in real time based on the cache push cycle; the remaining channel capacity is the remaining data capacity of the Bluetooth channel between the data holding device and the data access device, and the cache push cycle is less than the current Bluetooth communication cycle between the data access device and the data holding device; and When the remaining channel capacity is greater than the first data amount, the data to be transmitted in the first data amount is pushed from the transmit buffer to the Bluetooth channel until the transmit buffer no longer contains the data to be transmitted.

[0005] Secondly, embodiments of the present invention provide a file transfer optimization device based on dynamic channel remaining capacity awareness, integrated in a file data holding device for the target file transfer, comprising: The caching module is used to determine the data to be transferred in response to a file transfer request sent by a data access device and read the data to be transferred into the sending cache; A channel remaining capacity detection module is used to detect the channel remaining capacity in real time based on the cache push cycle; the channel remaining capacity is the remaining data capacity of the Bluetooth channel between the data holding device and the data access device, and the cache push cycle is less than the current Bluetooth communication cycle between the data access device and the data holding device; and The push module is used to push the data to be transmitted from the transmit buffer to the Bluetooth channel when the remaining channel capacity is greater than the first data amount, until the transmit buffer no longer contains the data to be transmitted.

[0006] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the file transfer optimization method based on dynamic channel remaining capacity awareness as described in any of the embodiments of the present invention.

[0007] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the file transfer optimization method based on dynamic channel remaining capacity awareness as described in any of the embodiments of the present invention.

[0008] This invention provides a file transfer optimization method, apparatus, electronic device, and storage medium based on dynamic channel remaining capacity awareness. It determines the data to be transferred in response to a file transfer request sent by a data access device and reads the data into a sending buffer. Based on a buffer push cycle, it detects the channel remaining capacity in real time, and when the channel remaining capacity is greater than a first data amount, it pushes the first data amount of data to be transferred from the sending buffer to the Bluetooth channel until the sending buffer no longer contains the data to be transferred. This significantly improves the transfer rate when transferring large files via Bluetooth Low Energy, greatly enhancing the user experience. Attached Figure Description

[0009] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a flowchart illustrating a file transfer optimization method based on dynamic channel remaining capacity awareness provided in an embodiment of the present invention. Figure 2 This is another flowchart illustrating the file transfer optimization method based on dynamic channel remaining capacity awareness provided in this embodiment of the invention; Figure 3This is another flowchart illustrating the file transfer optimization method based on dynamic channel remaining capacity awareness provided in this embodiment of the invention; Figure 4 This is another flowchart illustrating the file transfer optimization method based on dynamic channel remaining capacity awareness provided in this embodiment of the invention; Figure 5 This is another flowchart illustrating the file transfer optimization method based on dynamic channel remaining capacity awareness provided in this embodiment of the invention; Figure 6 This is a schematic diagram of a file transfer optimization device based on dynamic channel remaining capacity awareness provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0011] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0012] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0013] Figure 1This is a flowchart illustrating a file transfer optimization method based on dynamic channel remaining capacity awareness provided in an embodiment of the present invention. This embodiment is applicable to scenarios involving the transfer of large amounts of data via Bluetooth Low Energy. The method is applied to the file data holding device of the target file and can be executed by the file transfer optimization device based on dynamic channel remaining capacity awareness provided in this embodiment. This device can be implemented in software and / or hardware. In a specific embodiment, this device can be integrated into an electronic device, such as a computer or server. The following embodiments will illustrate this using the integration of this device into an electronic device as an example. (Reference) Figure 1 The method may specifically include the following steps: Step 101: In response to a file transfer request sent by the data access device, determine the data to be transferred and read the data into the transmission buffer. The data holding device is a Bluetooth Low Energy device and has established a Bluetooth connection with the data access device. This step facilitates pushing the data to be transferred to the Bluetooth channel between the data holding device and the data access device.

[0014] Specifically, the aforementioned data access device can be a Bluetooth Low Energy device or a regular Bluetooth device.

[0015] Specifically, the aforementioned data holding device can be either a master device or a slave device, and the aforementioned data access device can be either a master device or a slave device.

[0016] Specifically, the aforementioned slave device may be a wireless microphone, an AI voice recorder, or other such device, while the aforementioned master device may be a mobile phone or a tablet, or other such device.

[0017] Specifically, the file transfer request may include file identifier, file name, file path, and / or transfer length.

[0018] Specifically, the process of determining and transmitting data in response to a file transfer request sent by a data access device may include: determining the data to be transmitted based on the file name and / or file path.

[0019] Specifically, the process of reading the data to be transmitted into the sending buffer can include: reading the data to be transmitted into the sending buffer all at once or reading the data to be transmitted into the sending buffer in multiple parts.

[0020] Specifically, a Bluetooth connection between a data access device and a data holding device can be established through the following steps: After the slave device of the data access device and the data holding device are powered on, they initialize Bluetooth and enable Bluetooth function to send broadcast packets; the master device of the two devices starts scanning and, after capturing the broadcast signal of the data holding device, parses the connection-related parameters, completes device discovery and matching, and sends a connection request packet to the slave device; after receiving the connection request packet, the slave device agrees to the connection and returns a response, and both the master and slave devices synchronously enter the connected state.

[0021] Optionally, before determining the data to be transmitted and reading the data to be transmitted into the transmission buffer in response to a file transfer request sent by the data access device, the embodiments of the present invention further include: determining the minimum value of the real-time configurable communication cycle based on the acceptable minimum Bluetooth communication cycle of the data access device and the real-time network environment status, and configuring the current Bluetooth communication cycle as the minimum value of the real-time configurable communication cycle; and configuring the maximum length of the current Protocol Data Unit (PDU) between the data access device and the data holding device based on the maximum transmission unit (MTU) data volume of the data access device.

[0022] Specifically, when establishing a Bluetooth connection between the data access device and the data holding device, or after establishing a Bluetooth connection between the data access device and the data holding device, the minimum value of the real-time configurable communication period can be determined based on the acceptable minimum Bluetooth communication period of the data access device and the real-time network environment status, and the current Bluetooth communication period can be configured as the minimum value of the real-time configurable communication period; and the maximum length of the current protocol data unit between the data access device and the data holding device can be configured based on the maximum transmission unit data volume of the data access device.

[0023] Specifically, the real-time network environment status can be determined based on the signal strength and packet loss rate of broadcast packets before establishing a Bluetooth connection between the data access device and the data holding device.

[0024] Specifically, the minimum real-time configurable communication cycle can be determined based on the real-time network environment status, and the minimum real-time configurable communication cycle can be determined based on the acceptable minimum Bluetooth communication cycle of the data access device and the preliminary determination result.

[0025] Specifically, if the acceptable minimum Bluetooth communication cycle of the data access device is greater than the preliminary determination result, the acceptable minimum Bluetooth communication cycle of the data access device can be determined as the minimum real-time configurable communication cycle; otherwise, the preliminary determination result can be determined as the minimum real-time configurable communication cycle.

[0026] Specifically, when the data access device is a mobile phone, the maximum transmission unit (BYTE) data size can be determined based on the phone type. For example, when the phone type is an Android phone, the maximum BYTE data size can be set to 251 bytes, and when the phone type is an Apple phone, the maximum BYTE data size can be set to 180 bytes.

[0027] Specifically, the maximum length of the current protocol data unit of the configured data access device and data holding device can be set to be equal to the maximum transmission unit length of the data access device, or the maximum length of the current protocol data unit of the configured data access device and data holding device can be set to a specific proportion of the maximum transmission unit length of the data access device, such as 90-95% of the maximum transmission unit length of the data access device.

[0028] Specifically, the file transfer request sent by the data access device may include only one transfer round of file transfer request, so as to complete the transfer of all the data to be transferred corresponding to the target file within one transfer round.

[0029] Specifically, the file transfer request sent by the data access device may also include multiple transfer rounds of file transfer requests, so as to complete the transfer of all the data to be transferred corresponding to the target file in multiple transfer rounds.

[0030] Step 102: Real-time detection of remaining channel capacity based on the cache push cycle; the remaining channel capacity is the remaining data capacity of the Bluetooth channel between the data holding device and the data access device, and the cache push cycle is shorter than the current Bluetooth communication cycle between the data access device and the data holding device. This step enables the data in the transmission cache to be pushed to the Bluetooth channel between the data holding device and the data access device as quickly as possible based on the cache push cycle, which is shorter than the current Bluetooth communication cycle, so that the data access device can complete the reception of the data to be transmitted as quickly as possible.

[0031] Optionally, before step 102, the maximum data volume of the data access device is obtained and determined as the first data volume to improve the data transmission rate.

[0032] In a specific instance, when the data access device is an Apple mobile phone, the first data volume is determined to be 180 bytes.

[0033] Specifically, the first data volume can be set to a data volume slightly smaller than the maximum transmission unit data volume of the data access device, for example, it can be set to 90% of the maximum transmission unit data volume of the data access device, in order to reduce the risk of packet loss and improve transmission stability.

[0034] Specifically, the cache push cycle can be determined based on the current Bluetooth communication cycle before step 102.

[0035] Specifically, the cache push period can be preset to an empirical value, such as 1ms.

[0036] Specifically, when establishing a Bluetooth connection between a data access device and a data holding device, the maximum capacity of the Bluetooth channel can be configured by configuring the physical layer (PHY) data transmission rate.

[0037] Specifically, the process of real-time detection of channel remaining capacity based on the cache push cycle can include: real-time detection of the occupancy rate of the Bluetooth channel, and obtaining the channel remaining capacity based on the Bluetooth channel occupancy rate and the maximum capacity of the Bluetooth channel.

[0038] Specifically, the busy / idle status of the Bluetooth channel can be monitored using a Bluetooth packet capture device or a spectrum analyzer, and the occupancy rate of the Bluetooth channel can be determined based on the busy / idle status.

[0039] Specifically, you can also call the "HCI_CHANNEL_UTILIZATION event read" in the Bluetooth protocol stack to read the busy / idle status of the Bluetooth channel and determine the occupancy rate of the Bluetooth channel based on the busy / idle status.

[0040] Step 103: When the remaining channel capacity is greater than the first data volume, push the data to be transmitted from the transmit buffer to the Bluetooth channel until the transmit buffer no longer contains the data to be transmitted. This step, based on steps 101 and 102, significantly improves the transmission rate when transmitting large files via Bluetooth Low Energy, greatly enhancing the user experience.

[0041] Optionally, the file transfer optimization method based on dynamic channel remaining capacity awareness provided in this embodiment of the invention further includes: after pushing all the data to be transferred corresponding to the target file from the sending buffer to the Bluetooth channel, monitoring the packet loss retransmission request sent by the data access device and performing packet loss retransmission after detecting the packet loss retransmission request.

[0042] It is understandable that performing packet loss retransmission after completing all the data to be transmitted for the target file can help reduce the number of protocol interactions, reduce control overhead, compress retransmission timing costs, and improve transmission speed.

[0043] The following further introduces the file transfer optimization method based on dynamic channel remaining capacity awareness provided by the embodiments of the present invention.

[0044] Optional, such as Figure 2 As shown, if the file transfer request sent by the data access device only includes a file transfer request for one transfer round, the process of reading the data to be transferred into the send buffer in step 101 includes the following steps: Step 101A1: Real-time detection of remaining capacity of the sending cache based on the cache read cycle.

[0045] Specifically, the cache read cycle can be the same as the cache push cycle, or it can be different from the cache push cycle.

[0046] Step 101A2: When the remaining capacity of the sending buffer is greater than the second data amount, the data to be transmitted for the second data amount is read into the sending buffer until all the data to be transmitted corresponding to the target transmission file is read.

[0047] Specifically, the second data volume can be the same as or different from the first data volume.

[0048] Specifically, the second data volume can be set to be greater than the first data volume, and the cache read cycle can be set to be less than the cache push cycle, in order to reduce the overhead required for real-time detection and sending of the remaining cache capacity.

[0049] This embodiment is suitable for scenarios where the amount of data to be transferred corresponding to the target file is relatively small, and can help maximize the transfer rate when transferring the target file.

[0050] The following further introduces the file transfer optimization method based on dynamic channel remaining capacity awareness provided by the embodiments of the present invention.

[0051] Optionally, the file transfer request includes multiple request rounds of file transfer requests. Each request round of file transfer requests is used to request the file data of the target file to be transferred in a single round. Each request round of file transfer requests includes the file name of the target file to be transferred and the amount of data to be transferred in a single round.

[0052] Specifically, the amount of data transferred in a single round of file transfer requests in each request round can be the same or different.

[0053] Optional, such as Figure 3 As shown, that is Figure 1 Step 101 may include the following steps: Step 101B1: In response to the file transfer request in each request round, determine the memory space size of the sending buffer based on the amount of data transferred in a single round, and allocate the sending buffer based on the memory space size of the sending buffer.

[0054] Step 101B2: Determine the storage location of the data to be transmitted based on the file name, and read the data to be transmitted for a single round from the storage location into the sending buffer.

[0055] Specifically, steps 101B1 and 101B2 can be executed only in the first request round, while in other request rounds, only the data to be transmitted for a single round can be read from the storage location into the send buffer.

[0056] Specifically, such as Figure 4 As shown, the data access device can check whether it has successfully received the data to be transmitted sent by the data holding device in that request round after the end of any request round. If it has not successfully received the data, it can send a data retransmission request for that request round to the data access device.

[0057] Optional, such as Figure 4 As shown, the file transfer optimization method based on dynamic channel remaining capacity awareness provided in this embodiment of the invention further includes: when receiving a data retransmission request for any request round sent by the data access device, re-initiating the execution of reading the data to be transmitted for the single round of data requested for retransmission from the storage location into the sending buffer.

[0058] Optional, such as Figure 4 As shown, after successfully receiving the data to be transmitted sent by the data holding device in any request round, the data access device can check whether the transmission of all the data to be transmitted corresponding to the target file has been completed. If not, it sends a file transmission request for the next request round to the data holding device. If completed, it checks whether all the data to be transmitted has been lost. If packet loss has occurred, it sends a packet loss retransmission request to the data holding device. If no packet loss has occurred, it ends the transmission of the target file.

[0059] This embodiment is applicable to scenarios where the target file to be transmitted has a large amount of data to be transmitted. It can improve the transmission rate while avoiding problems such as retransmission errors that may be caused by excessive packet loss during the final packet loss and retransmission.

[0060] The following further introduces the file transfer optimization method based on dynamic channel remaining capacity awareness provided by the embodiments of the present invention.

[0061] Optionally, if a file transfer request can also include multiple transfer rounds of file transfer requests, then when responding to the file transfer requests for each request round, such as... Figure 5 As shown, it may include the following steps: Step 501: Determine the maximum allowed space for the send buffer based on real-time available local resources.

[0062] Specifically, the aforementioned real-time locally available resources include the idle RAM capacity, CPU load rate, and remaining cache quota of the Bluetooth protocol stack of the data holding device acquired in real time.

[0063] Specifically, before determining the maximum allowable space of the transmission buffer based on real-time available local resources, the total number of buffered data packets that the corresponding Bluetooth channel can carry can be calculated based on the current maximum length of the protocol data unit between the data access device and the data holding device, the number of packets that can be transmitted within a connection event, and the link packet loss rate. The process of determining the maximum allowable space of the transmission buffer based on real-time available local resources can include: determining the maximum allowable space of the transmission buffer based on real-time available local resources and the total number of buffered data packets that the corresponding Bluetooth channel can carry.

[0064] Step 502: Send the maximum allowed space of the sending cache to the data access device so that the data access device can determine the amount of data transmitted in a single round of the current request round based on the maximum allowed space of the sending cache.

[0065] Specifically, the data access device can determine the amount of data transmitted in a single round of the current request round to be less than the amount of data that the maximum allowed space of the sending buffer can hold.

[0066] Step 503: In response to the file transfer request of the current request round, determine the memory space size of the current round's sending cache based on the single round's data transfer volume of the current request round, and allocate the current sending cache based on the memory space size of the current round's sending cache.

[0067] Step 504: Determine the storage location of the data to be transmitted based on the file name, and read the data to be transmitted for the current request round from the storage location into the current sending cache.

[0068] Step 505: Real-time detection of remaining channel capacity based on cache push cycle.

[0069] Step 506: When the remaining channel capacity is greater than the first data amount, push the data to be transmitted from the current transmit buffer to the Bluetooth channel until there is no data to be transmitted in the current transmit buffer.

[0070] This invention, through determining the maximum allowed space of the sending cache based on real-time available local resources, enables the data access device to determine the amount of data transmitted in a single round of the current request based on the maximum allowed space of the sending cache. This further facilitates the improvement of data transmission rate while ensuring system stability.

[0071] Figure 6 This is a structural diagram of a file transfer optimization device based on dynamic channel remaining capacity awareness provided in an embodiment of the present invention. This device is integrated into a file data holding device for the target file transfer and is suitable for executing the file transfer optimization method based on dynamic channel remaining capacity awareness provided in an embodiment of the present invention. Figure 6 As shown, the device may specifically include: The cache module 601 is used to determine the data to be transmitted in response to a file transfer request sent by the data access device and read the data to be transmitted into the transmission cache. The data holding device is a Bluetooth Low Energy device and has established a Bluetooth connection with the data access device.

[0072] Optionally, the file transfer request includes multiple request rounds of file transfer requests. Each request round of file transfer requests is used to request the file data of the target file to be transferred in a single round. Each request round of file transfer requests includes the file name of the target file to be transferred and the amount of data to be transferred in a single round.

[0073] Optionally, the aforementioned caching module 601 can be specifically used to detect the remaining capacity of the sending cache in real time based on the cache reading cycle; and when the remaining capacity of the sending cache is greater than the second data amount, read the data to be transmitted of the second data amount into the sending cache until all the data to be transmitted corresponding to the target transmission file is read.

[0074] Optionally, the aforementioned caching module 601 can be specifically used to: determine the memory space size of the sending cache based on the amount of data transmitted in a single round in response to the file transfer request of each request round; allocate the sending cache based on the memory space size of the sending cache; and determine the storage location of the data to be transmitted based on the file name, and read the data to be transmitted in a single round from the storage location into the sending cache.

[0075] Optionally, the aforementioned caching module 601 can also be specifically used to determine the maximum allowed space of the sending cache based on real-time available local resources; and to send the maximum allowed space of the sending cache to the data access device, so that the data access device can determine the amount of data transmitted in a single round of the current request round based on the maximum allowed space of the sending cache.

[0076] The channel remaining capacity detection module 602 is used to detect the channel remaining capacity in real time based on the cache push cycle; the channel remaining capacity is the remaining data capacity of the Bluetooth channel between the data holding device and the data access device, and the cache push cycle is less than the current Bluetooth communication cycle between the data access device and the data holding device.

[0077] The push module 603 is used to push the data to be transmitted from the transmit buffer to the Bluetooth channel when the remaining channel capacity is greater than the first data amount, until the transmit buffer no longer contains the data to be transmitted.

[0078] Optionally, the file transfer optimization device based on dynamic channel remaining capacity awareness provided in this embodiment of the invention further includes: a packet loss retransmission module, which is used to monitor the packet loss retransmission request sent by the data access device and perform packet loss retransmission after monitoring the packet loss retransmission request after pushing all the data to be transmitted corresponding to the target file from the sending buffer to the Bluetooth channel.

[0079] Optionally, the file transfer optimization device based on dynamic channel remaining capacity awareness provided in this embodiment of the invention further includes: a first data volume determination module, used to obtain and determine the maximum transmission unit data volume of the data access device as the first data volume before pushing the first data volume of data to be transmitted from the transmission buffer to the Bluetooth channel when the channel remaining capacity is greater than the first data volume.

[0080] Optionally, the file transfer optimization device based on dynamic channel remaining capacity awareness provided in this embodiment of the invention further includes a configuration module, used to determine the minimum real-time configurable communication period based on the minimum acceptable Bluetooth communication period of the data access device and the real-time network environment status before determining the data to be transferred and reading the data to be transferred into the transmission buffer in response to the file transfer request sent by the data access device, and configure the current Bluetooth communication period as the minimum real-time configurable communication period; and configure the maximum length of the current protocol data unit between the data access device and the data holding device based on the maximum transmission unit data volume of the data access device.

[0081] This invention provides a file transfer optimization method, apparatus, electronic device, and storage medium based on dynamic channel remaining capacity awareness. It determines the data to be transferred in response to a file transfer request sent by a data access device and reads the data into a sending buffer. Based on a buffer push cycle, it detects the channel remaining capacity in real time, and when the channel remaining capacity is greater than a first data amount, it pushes the first data amount of data to be transferred from the sending buffer to the Bluetooth channel until the sending buffer no longer contains the data to be transferred. This significantly improves the transfer rate when transferring large files via Bluetooth Low Energy, greatly enhancing the user experience.

[0082] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is merely an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0083] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the file transfer optimization method based on dynamic channel remaining capacity awareness provided in any of the above embodiments.

[0084] This invention also provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the file transfer optimization method based on dynamic channel remaining capacity awareness provided in any of the above embodiments.

[0085] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the file transfer optimization method based on dynamic channel remaining capacity awareness as described in any of the embodiments of this invention.

[0086] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing an electronic device according to embodiments of the present invention. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0087] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0088] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.

[0089] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.

[0090] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0091] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0092] The modules and / or units described in the embodiments of this invention can be implemented in software or hardware. The described modules and / or units can also be housed in a processor; for example, a processor can be described as including a cache module, a channel remaining capacity detection module, and a push module. The names of these modules do not necessarily limit the functionality of the module itself.

[0093] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to: determine the data to be transmitted in response to a file transfer request sent by a data access device and read the data to be transmitted into a transmission buffer, wherein the data holding device is a Bluetooth Low Energy device and has established a Bluetooth connection with the data access device; detect the remaining channel capacity in real time based on a buffer push cycle; the remaining channel capacity is the remaining data capacity of the Bluetooth channel between the data holding device and the data access device, and the buffer push cycle is less than the current Bluetooth communication cycle between the data access device and the data holding device; and push the first amount of data to be transmitted from the transmission buffer to the Bluetooth channel when the remaining channel capacity is greater than a first amount of data, until the transmission buffer no longer contains the data to be transmitted.

[0094] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A file transfer optimization method based on dynamic channel remaining capacity awareness, applied to a file data holding device for target file transfer, characterized in that, include: In response to a file transfer request sent by a data access device, the device determines the data to be transferred and reads the data to be transferred into a transmission buffer. The data holding device is a Bluetooth Low Energy device and has established a Bluetooth connection with the data access device. The remaining channel capacity is detected in real time based on the cache push cycle; the remaining channel capacity is the remaining data capacity of the Bluetooth channel between the data holding device and the data access device, and the cache push cycle is less than the current Bluetooth communication cycle between the data access device and the data holding device; and When the remaining channel capacity is greater than the first data amount, the data to be transmitted in the first data amount is pushed from the transmit buffer to the Bluetooth channel until the transmit buffer no longer contains the data to be transmitted.

2. The file transfer optimization method based on dynamic channel remaining capacity awareness according to claim 1, characterized in that, The step of reading the data to be transmitted into the sending buffer includes: Real-time detection of remaining send buffer capacity based on buffer read cycle; and When the remaining capacity of the sending buffer is greater than the second data amount, the second data amount of data to be transmitted is read into the sending buffer until all the data to be transmitted corresponding to the target transmission file has been read.

3. The file transfer optimization method based on dynamic channel remaining capacity awareness according to claim 1, characterized in that, The file transfer request includes multiple request rounds of file transfer requests. Each request round of file transfer requests is used to request the file data of the target file to be transferred in a single round of data transfer. Each request round of file transfer requests includes the file name of the target file to be transferred and the amount of data to be transferred in a single round. The step of determining the data to be transferred and reading the data to be transferred into the sending buffer in response to a file transfer request sent by a data access device includes: In response to file transfer requests in each request round, the size of the sending buffer memory space is determined based on the amount of data transferred in a single round, and the sending buffer is allocated based on the size of the sending buffer memory space. as well as The storage location of the data to be transmitted is determined based on the file name, and the data to be transmitted in a single round is read from the storage location into the sending buffer.

4. The file transfer optimization method based on dynamic channel remaining capacity awareness according to any one of claims 1 to 3, characterized in that, Also includes: After pushing all the data to be transmitted corresponding to the target file from the sending buffer to the Bluetooth channel, the system monitors the packet loss retransmission request sent by the data access device and performs packet loss retransmission upon detecting the packet loss retransmission request.

5. The file transfer optimization method based on dynamic channel remaining capacity awareness according to claim 3, characterized in that, Before determining the size of the send buffer memory space based on the amount of data transferred in a single round in response to file transfer requests in each request round, the method further includes: The maximum allowed space for the send buffer is determined based on real-time available local resources; and The maximum allowed space of the send buffer is sent to the data access device so that the data access device can determine the amount of data to be transmitted in a single round of the current request round based on the maximum allowed space of the send buffer.

6. The file transfer optimization method based on dynamic channel remaining capacity awareness according to claim 1, characterized in that, Before pushing the required data of the first data amount from the transmit buffer to the Bluetooth channel when the remaining channel capacity is greater than the first data amount, the method further includes: The maximum data volume of the data access device is obtained and determined as the first data volume.

7. The file transfer optimization method based on dynamic channel remaining capacity awareness according to claim 1, characterized in that, Before determining the data to be transferred in response to a file transfer request sent by a data access device and reading the data to be transferred into a send buffer, the method further includes: The minimum configurable communication period is determined based on the acceptable minimum Bluetooth communication period of the data access device and the real-time network environment status, and the current Bluetooth communication period is configured to be the minimum configurable communication period. Configure the maximum length of the current protocol data unit between the data access device and the data holding device based on the maximum transmission unit data volume of the data access device.

8. A file transfer optimization device based on dynamic channel remaining capacity awareness, integrated in a file data holding device for the target file transfer, characterized in that, include: The caching module is used to determine the data to be transmitted in response to a file transfer request sent by the data access device and read the data to be transmitted into the transmission cache. The data holding device is a Bluetooth Low Energy device and has established a Bluetooth connection with the data access device. The channel remaining capacity detection module is used to detect the channel remaining capacity in real time based on the cache push cycle; the channel remaining capacity is the remaining data capacity of the Bluetooth channel between the data holding device and the data access device, and the cache push cycle is less than the current Bluetooth communication cycle between the data access device and the data holding device. as well as The push module is used to push the data to be transmitted from the transmit buffer to the Bluetooth channel when the remaining channel capacity is greater than the first data amount, until the transmit buffer no longer contains the data to be transmitted.

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 program, it implements the file transfer optimization method based on dynamic channel remaining capacity awareness as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the file transfer optimization method based on dynamic channel remaining capacity awareness as described in any one of claims 1 to 7.