File transmission method and device, electronic equipment and storage medium

The first device acquires its own data processing capabilities and sends control frames to the second device to ensure that the data frame is within the data processing capabilities of the first device, solving the problems of low data transmission efficiency and poor stability between low-end devices, and achieving efficient and reliable data transmission.

CN119652886APending Publication Date: 2025-03-18BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411814773.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The prior art has the performance gap in data transmission between low-end devices, and the data transmission efficiency is low due to performance gaps, and it is difficult to fully utilize the equipment performance, so the stability and reliability of data transmission cannot be guaranteed.

Method used

The first device acquires its own data processing capability and sends a control frame to the second device, and the control frame includes at least sending constraint information. The second device sends a data frame based on the transmission constraint information, ensuring that the data frame is within the data processing capability of the first device.

Benefits of technology

Improve the efficiency and stability of file transfer, avoid data loss and omission, and ensure that the data throughput during data transfer reaches the performance limit of the first device as much as possible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652886A_ABST
    Figure CN119652886A_ABST
Patent Text Reader

Abstract

The invention provides a file transmission method and device, electronic equipment and a storage medium, and relates to the technical field of data processing, in particular to the field of file transmission and data caching. According to the specific implementation scheme, the data processing capacity of first equipment is obtained; according to the data processing capability, sending a control frame to the second device, the control frame at least comprising sending constraint information; and receiving a data frame sent by the second device based on the sending constraint information, wherein the data frame comprises one or more data blocks of the target file needing to be transmitted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, specifically to the field of file transmission and data caching, and in particular to a file transmission method, device, electronic device and storage medium. Background Art

[0002] In the current data transmission scheme for low-end devices, due to the large performance gap between the sending device and the receiving device, network congestion and low data transmission efficiency will occur. The existing method can reduce the sending frequency and the size of the transmission data block to solve the above problems, but it is difficult to fully utilize the performance of the device and cannot guarantee the stability and reliability of data transmission. Summary of the invention

[0003] The present disclosure provides a file transmission method, device, electronic device and storage medium.

[0004] According to one aspect of the present disclosure, a file transmission method is provided, which is performed by a first device, where the first device is a resource-constrained device, including:

[0005] Acquiring data processing capability of the first device itself;

[0006] Sending a control frame to the second device according to the data processing capability, the control frame including at least sending constraint information;

[0007] A data frame is received which is sent by the second device based on the sending constraint information, wherein the data frame includes one or more data blocks of the target file to be transmitted.

[0008] According to another aspect of the present disclosure, another file transmission method is provided, which is performed by a second device and includes:

[0009] receiving a control frame sent by a first device, where the control frame is determined at least according to a data processing capability of the first device itself and includes at least sending constraint information;

[0010] Based on the sending constraint information, a data frame is sent to the first device, wherein the data frame includes one or more data blocks of the target file to be transmitted.

[0011] According to a third aspect of the present disclosure, a file transmission apparatus is provided, which is executed by a first device, where the first device is a resource-constrained device, including:

[0012] A first acquisition module, used to acquire the data processing capability of the first device itself;

[0013] A sending module, configured to send a control frame to the second device according to the data processing capability, wherein the control frame at least includes sending constraint information;

[0014] The receiving module is used to receive a data frame sent by the second device based on the sending constraint information, wherein the data frame includes one or more data blocks of the target file to be transmitted.

[0015] According to a fourth aspect of the present disclosure, another file transmission apparatus is provided, which is executed by a second device and includes:

[0016] A receiving module, configured to receive a control frame sent by a first device, wherein the control frame is determined at least according to a data processing capability of the first device itself and at least includes sending constraint information;

[0017] A sending module is used to send a data frame to the first device based on the sending constraint information, wherein the data frame includes one or more data blocks of the target file to be transmitted.

[0018] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect embodiment or the second aspect embodiment.

[0019] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect embodiment or the second aspect embodiment.

[0020] According to a seventh aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the steps of the method described in the first aspect embodiment or the second aspect embodiment are implemented.

[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0023] Figure 1 It is a flowchart of a file transmission method provided by an embodiment of the present disclosure;

[0024] Figure 2 is a flowchart of another file transmission method provided by an embodiment of the present disclosure;

[0025] Figure 2A is a schematic diagram of a request frame provided by an embodiment of the present disclosure;

[0026] Figure 2B is a schematic diagram of a control frame provided by an embodiment of the present disclosure;

[0027] Figure 2C is a schematic diagram of a data frame provided by an embodiment of the present disclosure;

[0028] Figure 3 is a flowchart of another file transmission method provided by an embodiment of the present disclosure;

[0029] Figure 3A is a schematic diagram of an end frame provided by an embodiment of the present disclosure;

[0030] Figure 4 is a flowchart of another file transmission method provided by an embodiment of the present disclosure;

[0031] Figure 5 is a flowchart of another file transmission method provided by an embodiment of the present disclosure;

[0032] Figure 6 is an interactive schematic diagram of a file transmission method provided by an embodiment of the present disclosure;

[0033] Figure 7 is a structural block diagram of a file transmission device provided by an embodiment of the present disclosure;

[0034] Figure 8 is a structural block diagram of another file transmission device provided by an embodiment of the present disclosure;

[0035] Fig. 9 A schematic block diagram of an electronic device for implementing an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0036] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0037] Data processing is the collection, storage, retrieval, processing, transformation and transmission of data. Its basic purpose is to extract and derive valuable and meaningful data for certain specific people from a large amount of data that may be disorganized and difficult to understand.

[0038] File transfer refers to transferring a file or part of it from one computer system to another. It can be a remote file transfer over a network or a local file transfer.

[0039] Data caching refers to temporarily storing data in memory or other high-speed storage media to facilitate quick access and reading of data. By caching data, frequent queries to databases or other data sources can be avoided, thereby reducing system load and increasing data access speed.

[0040] Figure 1 is a flowchart of a file transmission method provided by an embodiment of the present disclosure; Figure 1 As shown, the method is executed by a first device, where the first device is a resource-constrained device, and includes the following steps:

[0041] S101, obtaining data processing capability of the first device itself.

[0042] Resource-constrained devices refer to embedded devices that are limited in hardware resources or software resources such as processing power, memory, storage space or network bandwidth, with poor input and output performance, no event-driven capability and asynchronous processing mechanism; for example, the first device can be a dash meter on a motorcycle, a smart watch, a low-end smart phone, etc. When transferring files with the first device, the data transmission speed is slow and cannot meet the product requirements.

[0043] Optionally, the data processing capability may include available memory, network transmission capability, bandwidth size, and file writing capability, etc. The data that the first device can currently process can be determined based on the data processing capability of the first device to avoid sending data that exceeds the data processing capability of the first device.

[0044] S102: Send a control frame to the second device according to the data processing capability.

[0045] The control frame includes at least sending constraint information, and the sending constraint information can be used to constrain the amount of data sent by the second device.

[0046] Optionally, the sending constraint information can be determined based on the data processing capability, for example, memory constraints are performed based on the available memory in the data processing capability, and transmission constraints are performed based on the network transmission capability in the data processing capability. The sending constraint information is sent to the second device so that the second device performs file transfer based on the constraint information, thereby preventing the file transmitted by the second device from exceeding the data processing capability of the first device.

[0047] Optionally, the second device is a smart device capable of data transmission, such as a smart phone, a laptop computer, or a tablet computer.

[0048] S103: Receive a data frame sent by the second device based on the sending constraint information.

[0049] It can be understood that after receiving the constraint information, the second device can determine the available memory and transmission capacity according to the data constraints in the sending constraint information, and determine the data to be sent based on the available memory. The memory occupied by the data to be sent should be less than or equal to the constrained available memory, thereby ensuring that the first device can smoothly receive and send data frames.

[0050] In some implementations, the second device determines a data frame to be sent according to the sending constraint information, the data frame includes one or more data blocks of the target file to be transmitted, and the data frame is sent based on the constraint information; the first device receives the data frame.

[0051] In this embodiment, the data processing capability of the first device itself is determined to avoid data loss caused by the data frame received by the first device exceeding the data processing capability. The first device can send a control frame to the second device according to the data processing capability, and the control frame includes sending constraint information determined based on the data processing information. The second device can determine the data frame to be sent according to the sending constraint information to ensure that the data frame to be sent is within the data processing capability of the first device, so that the first device can smoothly receive the data frame sent by the second device based on the sending constraint information, thereby improving the data transmission performance in the file, avoiding data loss, and achieving transmission with maximum efficiency.

[0052] Figure 2 is a flowchart of another file transmission method provided by an embodiment of the present disclosure; Figure 2 As shown, the method is executed by a first device, where the first device is a resource-constrained device, and includes the following steps:

[0053] S201, obtaining the data processing capability of the first device itself.

[0054] In some implementations, a request frame sent by the second device can be received, the request frame is used to request the first device to send a target file, and the request frame includes at least description information of the target file to determine the situation of the target file and provide a basis for stable data transmission.

[0055] Optionally, the request frame may include a type field, a data length field and a data field; wherein the data length field and the data field are description information of the target file, the data length field is the length of the data currently being sent, and the data field is the content of the data being sent, such as a file name, version number or message digest value (Message-Digest Algorithm 5, MD5).

[0056] For example, the request frame can be composed of a type field, a data length field, and a data field, which are sequentially connected. Figure 2A As shown, the type field occupies 4 bits, the data length field occupies 16 bits, and the length of the data field is determined by the data length field. The composition of the request frame can be shown in the following table:

[0057] Table 1

[0058]

[0059] In the embodiments of the present disclosure, the implementation method of step S201 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0060] S202, determining historical transmission information of the target file.

[0061] Optionally, the historical transmission information may be data information that has been transmitted, such as data length and data content.

[0062] S203: Determine sending constraint information according to the data processing capability and historical transmission information.

[0063] The sending constraint information includes at least one of the number of data frames that can be continuously received, the time interval between data frames, the length of the received file, and the maximum length of data that can be sent by the second device.

[0064] By way of example, the number of data frames that can be continuously received by the first device can be determined based on the data processing capability. For example, if the maximum number of data frames that can be continuously received by the first device is 5, then the number of data frames that can be continuously received in the sending constraint information should be less than or equal to 5. The time interval between data frames in the sending constraint information refers to the minimum time interval between sending two data frames. The maximum data length that can be sent by the second device can be determined based on the processing capability of the second device.

[0065] It can be understood that the length of the received file can be determined based on the data information that has been transmitted in the historical transmission information; in some implementations, the number of bytes in the received file can be identified to determine the length of the received file, thereby determining the sending constraint information. Based on the received file length in the sending constraint information, the file that has been sent and the starting position of the sent data can be determined, thereby avoiding repeated data transmission and improving data transmission efficiency.

[0066] S204: Generate a control frame according to the sending constraint information, and send the control frame to the second device.

[0067] Optionally, the information field corresponding to each information item in the sending constraint information in the control frame can be determined; the corresponding information item is written in the information field, and the frame type indicator is written in the control frame to obtain the control frame, so that the control frame includes more comprehensive constraint information.

[0068] In some implementations, the information fields in the control frame may include "frame type", "number of frames that can be received continuously", "delay between consecutive data frames", "received file length", and "data length".

[0069] It can be understood that the number of data frames that can be continuously received in the sending constraint information is written into the corresponding information field "Number of frames that can be continuously received", the time interval between data frames in the sending constraint information is written into the information field "Delay between consecutive data frames", the length of the file received in the sending constraint information is written into the information field "Length of the received file", and the maximum data length that can be sent by the second device in the sending constraint information is written into the information field "Data length".

[0070] Optionally, the frame type indicator may be written into the "frame type" information field, and the frame type indicator of the control frame may be 0x02; for example, the composition of the control frame may refer to the following table:

[0071] Table 2

[0072] Information Domain Field describe FT: frame type field, occupies 4 bits 0x02 indicates control frame FS: The number of frames that can be received continuously, occupies 8 bits The number of consecutive data frames that the receiver wants the sender to send TS: Delay between consecutive data frames, occupies 8 bits The minimum time interval between two frames sent by the sender (unit: ms) PS: The length of the received file, 32 bits The sender continues to send data from this position DL: Data length field, 16 bits The maximum length of data that the sender can send

[0073] After generating a control frame based on the transmission constraint information, the control frame is sent to the second device. The control frame may be as follows: Figure 2B As shown, pos is used to determine the current position, which is applicable to the field interruption position in the breakpoint resume scenario to avoid repeated data transmission.

[0074] In some implementations, the control frame may also be updated; in response to satisfying the update condition, the data processing capability and available resources of the first device itself are updated to generate a new control frame, and the new control frame is sent to the second device.

[0075] Optionally, the update condition can be met to update the control frame when a set period is reached, or the previous data frame transmission is completed and the control frame is updated to transmit the new data frame, or the time interval between the sending time of the previous control frame and the current time is long and the control frame is updated and resent, thereby improving the flexibility of the data transmission process.

[0076] S205: Receive a data frame sent by the second device based on the sending constraint information.

[0077] In some implementations, the data frame can be as follows Figure 2CAs shown, the starting position of the data sent in the data frame can be determined based on the length of the received data, that is, the data sent in the target data is determined according to the length of the received data, and the data block is sent starting from the next position of the sent data. The composition of the data frame can be:

[0078] Table 3

[0079] Fields describe FT: frame type field, occupies 4 bits 0x03 indicates data frame DL: Data length field, 16 bits The length of the data sent DT: data field, the length is determined by DL Data block sent

[0080] In the embodiments of the present disclosure, the implementation method of step S205 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0081] In this embodiment, a request frame for sending a target file sent by the second device is received, and description information of the target file is determined according to the request frame. The first device generates sending constraint information based on its own data processing capability and historical transmission information, and then fills the information field in the control frame based on each information item in the sending constraint information to generate a control frame, and sends the control frame to the second device. When the update condition is met, the control frame is updated and sent to the second device. The second device can determine the data frame to be sent based on the control frame, thereby sending the data frame of the target file to the first device, ensuring that the data frame to be sent is within the data processing capability of the first device, so that the first device can smoothly receive the data frame sent by the second device based on the sending constraint information, thereby improving the data transmission performance in the file.

[0082] Figure 3 is a flowchart of another file transmission method provided by an embodiment of the present disclosure; Figure 3 As shown, the method is executed by a first device, where the first device is a resource-constrained device, and includes the following steps:

[0083] S301, obtaining the data processing capability of the first device itself.

[0084] In the embodiments of the present disclosure, the implementation method of step S301 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0085] S302, determining historical transmission information of the target file.

[0086] In the embodiments of the present disclosure, the implementation method of step S302 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0087] S303: Determine sending constraint information according to the data processing capability and historical transmission information.

[0088] In the embodiments of the present disclosure, the implementation method of step S303 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0089] S304: Generate a control frame according to the sending constraint information, and send the control frame to the second device.

[0090] In the embodiments of the present disclosure, the implementation method of step S304 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0091] S305: Receive a data frame sent by the second device based on the sending constraint information.

[0092] In the embodiments of the present disclosure, the implementation method of step S305 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0093] S306: parse the data block from the data frame and cache it in a first cache in the first device.

[0094] In some implementations, the memory of the first cache can be configured in advance according to the processing capability of the first device, which is not described in detail; data blocks can be parsed one by one from the data frame and cached accordingly in the first cache, and after all data blocks are parsed from the data frame, all data blocks can be cached together in the first cache until the cache is full.

[0095] Optionally, the data receiving thread may be awakened; the data frame is received through the data receiving thread, and the data block in the data frame is cached in the first cache, so as to reduce time consumption and improve data transmission efficiency.

[0096] S307 , during the process of caching the data block in the first cache, read the cached data block from the first cache and write it into the memory of the first device.

[0097] It can be understood that while the first cache is caching data blocks, the cached data blocks are synchronously read from the first cache according to the first-in-first-out principle and written into the memory of the first device. That is, while the data blocks are written into the first cache, the cached data blocks are read from the first cache and written into the memory. After the data blocks are written into the memory of the first device, the corresponding data blocks are deleted from the first cache until the data blocks in the first cache are empty, indicating that all data transmission is completed, which can effectively improve the data access speed and reduce the time consumption in data transmission.

[0098] Optionally, the data writing thread may be awakened; the data block is read from the first cache by the data writing thread, and is written into the memory of the first device, thereby improving data transmission efficiency and stability.

[0099] It can be understood that, in the process of writing data to the first cache and reading data from the first cache, when the first cache is full, that is, when the first cache cannot write new data blocks, the writing of data blocks to the first cache is stopped and waits for additional space to appear in the first cache, and the writing of files is continued from the last stopped position, thereby ensuring the stability and efficiency of file transfer.

[0100] S308: Receive an end frame sent by the second device.

[0101] The end frame is used to indicate that the target file has been sent, that is, after the second device completes sending the data frame, it sends an end frame to indicate that the current target file has been sent; optionally, the end frame may include description information of the target file, such as the total length of the target file and the total length of the sent data.

[0102] For example, the end frame can be as follows Figure 3A As shown, the composition of the end frame can be shown in the following table:

[0103] Table 4

[0104] Fields describe FT: frame type field, occupies 4 bits 0x04 indicates the end frame DL: File length field, 32 bits Total file length TL: Send length field, 32 bits The total length of the data sent

[0105] In some implementations, the first total length and the sent length of the target file can be determined based on the end frame; the second total length and the received length of the target file in the memory of the first device are obtained; the integrity of the target file is verified based on the first total length and the second total length, as well as the sent length and the received length; it can be understood that the first total length can be compared with the second total length, and the sent length can be compared with the received length. When the first total length is the same as the second total length, and the sent length is the same as the received length, it is determined that the target file is complete, thereby ensuring the integrity of sending and receiving the target file and avoiding data loss and omission.

[0106] In this embodiment, sending constraint information is determined based on data processing capability and historical transmission information, a control frame is generated based on the sending constraint information and sent to the second device, a data frame sent by the second device based on the sending constraint information is received, a data block is parsed from the data frame and cached in a first cache, and the cached data block is read from the first cache and written into the memory of the first device, and after the second device completes sending the target file, an end frame is sent to indicate that the target file has been sent, and verification can also be performed based on the data length in the end frame to ensure the integrity of the sending and receiving of the target file and avoid data loss and omission; through request frames and control frames, it is ensured that the sent data frame is within the data processing capability of the first device, and the sending of data frames exceeding the data processing capability of the first device is avoided, so that the data throughput of the transmission process reaches the performance limit of the first device as much as possible, so as to maximize the transmission efficiency, and when receiving the data frame, the data frame is parsed and stored in the first cache, and while writing into the first cache, the cached data is read from the first cache and written into the memory of the first device, so as to reduce the time consumption of data transmission.

[0107] Figure 4 is a flowchart of another file transmission method provided by an embodiment of the present disclosure; Figure 4 As shown, the method is performed by the second device, and includes the following steps:

[0108] S401: Receive a control frame sent by a first device.

[0109] Optionally, the second device is a smart device capable of data transmission, such as a smart phone, a laptop computer, or a tablet computer.

[0110] The control frame is determined at least based on the data processing capability of the first device itself, and at least includes sending constraint information; optionally, the data processing capability of the first device itself may include information such as the available memory of the first device, the number of data frames that can be continuously received, and the length of the received file.

[0111] In some implementations, the sending constraint information can be determined based on the data processing capability of the first device, and the sending constraint information is carried in a control frame for sending, thereby receiving the sending constraint information sent by the first device. The sending constraint information is used to constrain the sending of data frames so that the sending data frames do not exceed the data processing capability of the first device, thereby avoiding data loss.

[0112] S402: Send a data frame to the first device based on the sending constraint information.

[0113] It is understandable that the data frame to be sent to the first device may be determined according to the constraint requirements on the data frame in the sending constraint information, wherein the data frame includes one or more data blocks of the target file to be transmitted.

[0114] For example, assuming that the number of data frames that the first device can continuously receive is 5 according to the sending constraint information, the number of consecutive data frames sent to the first device should be less than or equal to 5 based on the sending constraint information, so as to avoid the first device being unable to successfully receive the data frames, resulting in data omission or loss.

[0115] In this embodiment, a control frame sent by the first device is received, and the sending constraint information included in the control frame is determined. The second device determines the data frame to be sent based on the sending constraint information to avoid the situation where the sent data frame exceeds the data processing capability of the first device, causing data omission or loss, thereby improving data transmission performance.

[0116] Figure 5 is a flowchart of another file transmission method provided by an embodiment of the present disclosure; Figure 5 As shown, the method is performed by the second device, and includes the following steps:

[0117] S501: Receive a control frame sent by a first device.

[0118] The sending constraint information includes at least one of the number of data frames that can be continuously received, the time interval between data frames, the length of the received file, and the maximum data length that can be sent by the second device. More accurate data constraints are performed based on the sending constraint information to improve data transmission stability.

[0119] In some implementations, a request frame may also be sent to the first device, where the request frame is used to request the first device to send the target file, and the request frame includes at least description information of the target file.

[0120] Optionally, the request frame may include a type field, a data length field and a data field; wherein the data length field and the data field are description information of the target file, the data length field is the length of the data currently being sent, and the data field is the content of the data being sent, such as the file name, version number or MD5 value, providing a basis for subsequent stable data transmission.

[0121] S502: Send a data frame to the first device based on the sending constraint information.

[0122] In some implementations, the control frame can be parsed to obtain a frame type indicator; optionally, the frame type indicator can be represented as 0x02; in response to the frame type indicator being a control frame indicator, determine the information field corresponding to each information item in the sending constraint information in the control frame, and extract the corresponding information item from the information field.

[0123] Optionally, the information fields in the sending constraint information can be "the number of frames that can be received continuously", "the delay between consecutive data frames", "the length of the received file" and "the length of the data"; the actual value in each information field is the corresponding information item, the corresponding information item is extracted from the sending constraint information, and the sending strategy of the second device is configured according to the information item.

[0124] In some implementations, the sending strategy configuration may include data length and data field, that is, determining the sent data length and the sent data field based on the information item, and sending the data frame to the first device according to the sending strategy configuration to avoid the data frame exceeding the data processing capability of the first device and ensure smooth transmission of the data frame.

[0125] For example, assuming that the number of frames that can be continuously received in the sending constraint information is 5, the delay between consecutive data frames is 3, the received file length is 10, and the data length is 30, the sending configuration strategy can be to send consecutive data frames every 3ms, the number of consecutive data frames is 5, the sent data length is 30, and data is sent from the next field position corresponding to the position of the received file length.

[0126] In some implementations, the data blocks of the target file may also be read from the memory of the second device and cached in the second cache of the second device; that is, the data blocks of the target file are read and cached one by one in the second cache of the second device.

[0127] In the process of caching data blocks in the second cache, based on the sending constraint information, the cached data blocks are read from the second cache according to the first-in-first-out principle and sent to the first device. That is, while the data is cached in the second cache, the cached data blocks are read from the second cache for sending. The sending principle follows the requirements of the sending constraint information to improve data transmission efficiency and transmission stability.

[0128] In some implementations, the data reading thread and the data sending thread can also be woken up; the data reading thread reads the data block from the memory of the second device and caches the data block in the second cache; the data sending thread reads the data block from the second cache according to the first-in-first-out principle based on the sending constraint information and sends it to the first device; that is, the data reading thread and the data sending thread are woken up at the same time, and the data reading thread and the data sending thread respectively read the data block and send the data block, thereby saving data transmission time.

[0129] S503: Send an end frame to the first device.

[0130] The end frame is used to indicate to the first device that the target file has been sent. That is, after the target file is sent, the end frame is sent to the first device to promptly determine that the current target file has been sent, thereby avoiding waste of resources.

[0131] Optionally, the first total length and the sent length of the target file can be determined; based on the first total length and the sent length, an end frame is generated, and the first total length and the sent length are used to verify the integrity of the target file; it can be understood that the first total length can be compared with the second total length, and the sent length can be compared with the received length. When the first total length is the same as the second total length, and the sent length is the same as the received length, the integrity of the sending and receiving of the target file is ensured to avoid data loss and omission.

[0132] In this embodiment, a control frame sent by the first device is received, so that the data processing capability and sending constraint information of the first device are obtained according to the control frame, and a data frame is sent to the first device based on the sending constraint information to ensure that the sent data frame does not exceed the data processing capability of the first device, thereby avoiding unsuccessful data sending or data loss; and in the process of sending data to the first device, advance caching can be performed based on the second cache and reading and sending can be performed at the same time, thereby improving the stability of the data transmission process and reducing the time consumption of data transmission. After the target file is completely sent, an end frame is sent to the first device to indicate that the sending of the target file is completed, and verification can also be performed based on the total length of data in the end frame, the sending length and the receiving length to ensure the integrity of the sending and receiving of the target file and avoid data loss and omission.

[0133] Figure 6 is an interactive schematic diagram of a file transmission method provided by an embodiment of the present disclosure; Figure 6 As shown, the method includes:

[0134] S601, the first device obtains its own data processing capability.

[0135] S602: The first device determines historical transmission information of the target file.

[0136] S603: The first device determines to send constraint information according to data processing capability and historical transmission information.

[0137] S604: The first device generates a control frame according to the sending constraint information, and sends the control frame to the second device.

[0138] S605: The second device sends a data frame to the first device based on the sending constraint information.

[0139] S606: The first device receives a data frame sent by the second device based on the sending constraint information.

[0140] S607: The second device sends an end frame to the first device.

[0141] In the embodiments of the present disclosure, the implementation methods of step S601 to step S607 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0142] In this embodiment, the first device generates sending constraint information according to its own data processing capability and historical transmission information, and generates a control frame based on the sending constraint information and sends it to the second device. After receiving the control frame sent by the first device, the second device sends a data frame to the first device according to the sending constraint information in the control frame to ensure that the sent data frame does not exceed the data processing capability of the first device, thereby avoiding unsuccessful data sending or data loss; after the target file is completely sent, an end frame is sent to the first device to indicate that the sending of the target file is complete, thereby improving data transmission efficiency while reducing the possibility of data loss and omission.

[0143] Figure 7 is a structural block diagram of a file transmission device provided by an embodiment of the present disclosure; it is executed by a first device, and the first device is a resource-constrained device, such as Figure 7 As shown, the file transmission device 700 includes:

[0144] A first acquisition module 701 is used to acquire the data processing capability of the first device itself;

[0145] A sending module 702, configured to send a control frame to the second device according to the data processing capability, where the control frame at least includes sending constraint information;

[0146] The receiving module 703 is configured to receive a data frame sent by the second device based on the sending constraint information, where the data frame includes one or more data blocks of the target file to be transmitted.

[0147] In some implementations, the sending module 702 includes:

[0148] Determine the historical transmission information of the target file;

[0149] Determine sending constraint information according to the data processing capability and the historical transmission information, wherein the sending constraint information includes at least one of the number of data frames that can be continuously received, the time interval between data frames, the length of the received file, and the maximum length of data that can be sent by the second device;

[0150] A control frame is generated according to the sending constraint information, and the control frame is sent to the second device.

[0151] In some implementations, the sending module 702 includes:

[0152] Determine the information field corresponding to each information item in the sending constraint information in the control frame;

[0153] The corresponding information item is written into the information field, and the frame type indicator is written into the control frame to obtain the control frame.

[0154] In some implementations, the apparatus 700 further includes:

[0155] In response to satisfying the update condition, the data processing capability and available resources of the first device itself are updated to generate a new control frame, and the new control frame is sent to the second device.

[0156] In some implementations, the receiving module 703 further includes:

[0157] Parsing the data block from the data frame and buffering it in a first buffer in the first device;

[0158] During the process of caching the data block in the first cache, the cached data block is read from the first cache and written into the memory of the first device.

[0159] In some implementations, the apparatus 700 further includes:

[0160] Wake up the data receiving thread and the data writing thread;

[0161] Receive a data frame through a data receiving thread, and cache a data block in the data frame into a first cache;

[0162] The data block is read from the first cache through the data writing thread and written into the memory of the first device.

[0163] In some implementations, the apparatus 700 further includes:

[0164] An end frame sent by the second device is received, where the end frame is used to indicate that the target file has been sent completely.

[0165] In some implementations, the apparatus 700 further includes:

[0166] Determine the first total length and the sent length of the target file according to the end frame;

[0167] Obtaining a second total length and a received length of the target file in the memory of the first device;

[0168] The integrity of the target file is verified according to the first total length and the second total length, as well as the sent length and the received length.

[0169] In some implementations, the first acquisition module 701 further includes:

[0170] A request frame sent by the second device is received, where the request frame is used to request the first device to send a target file, and the request frame includes at least description information of the target file.

[0171] In this embodiment, sending constraint information is determined based on data processing capability and historical transmission information, a control frame is generated based on the sending constraint information and sent to the second device, a data frame sent by the second device based on the sending constraint information is received, a data block is parsed from the data frame and cached in a first cache, and the cached data block is read from the first cache and written into the memory of the first device, and after the second device completes sending the target file, an end frame is sent to indicate that the target file has been sent, and verification can also be performed based on the data length in the end frame to ensure the integrity of the sending and receiving of the target file and avoid data loss and omission; through request frames and control frames, it is ensured that the sent data frame is within the data processing capability of the first device, and the sending of data frames exceeding the data processing capability of the first device is avoided, so that the data throughput of the transmission process reaches the performance limit of the first device as much as possible, so as to maximize the transmission efficiency, and when receiving the data frame, the data frame is parsed and stored in the first cache, and while writing into the first cache, the cached data is read from the first cache and written into the memory of the first device, so as to reduce the time consumption of data transmission.

[0172] Figure 8 is a structural block diagram of another file transmission device provided by an embodiment of the present disclosure; executed by the second device, such as Figure 8 As shown, the file transmission device 800 includes:

[0173] The receiving module 801 is used to receive a control frame sent by a first device, where the control frame is determined at least according to the data processing capability of the first device itself and at least includes sending constraint information;

[0174] The sending module 802 is configured to send a data frame to the first device based on the sending constraint information, wherein the data frame includes one or more data blocks of the target file to be transmitted.

[0175] In some implementations, the transmission constraint information includes at least one of the number of data frames that can be continuously received, the time interval between data frames, the length of a received file, and the maximum length of data that can be transmitted by the second device.

[0176] In some implementations, the sending module 802 includes:

[0177] Parsing the control frame to obtain a frame type indicator;

[0178] In response to the frame type indicator being a control frame indicator, determining an information field corresponding to each information item in the transmission constraint information in the control frame, and extracting the corresponding information item from the information field;

[0179] The second device is configured with a sending policy according to the information item, and a data frame is sent to the first device according to the sending policy configuration.

[0180] In some implementations, the sending module 802 includes:

[0181] Reading a data block of the target file from the memory of the second device and caching it in a second cache of the second device;

[0182] During the process of caching the data block in the second cache, based on the sending constraint information, the cached data block is read from the second cache and sent to the first device.

[0183] In some implementations, the apparatus 800 further includes:

[0184] Wake up the data reading thread and the data sending thread;

[0185] Reading a data block from the memory of the second device through a data reading thread, and caching the data block into a second cache;

[0186] The data block is read from the second cache and sent to the first device based on the sending constraint information through the data sending thread.

[0187] In some implementations, the apparatus 800 further includes:

[0188] An end frame is sent to the first device, wherein the end frame is used to indicate to the first device that the target file has been sent completely.

[0189] In some implementations, the apparatus 800 further includes:

[0190] Determine a first total length and a sent length of the target file;

[0191] An end frame is generated according to the first total length and the sent length, and the first total length and the sent length are used to verify the integrity of the target file.

[0192] In some implementations, the receiving module 801 further includes:

[0193] A request frame is sent to the first device, where the request frame is used to request the first device to send a target file, and the request frame includes at least description information of the target file.

[0194] In this embodiment, a control frame sent by the first device is received, so that the data processing capability and sending constraint information of the first device are obtained according to the control frame, and a data frame is sent to the first device based on the sending constraint information to ensure that the sent data frame does not exceed the data processing capability of the first device, thereby avoiding unsuccessful data sending or data loss; and in the process of sending data to the first device, advance caching can be performed based on the second cache and reading and sending can be performed at the same time, thereby improving the stability of the data transmission process and reducing the time consumption of data transmission. After the target file is completely sent, an end frame is sent to the first device to indicate that the sending of the target file is completed, and verification can also be performed based on the total length of data in the end frame, the sending length and the receiving length to ensure the integrity of the sending and receiving of the target file and avoid data loss and omission.

[0195] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0196] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0197] Fig. 9 A schematic block diagram of an electronic device for implementing an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0198] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0199] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0200] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as a file transfer method. For example, in some embodiments, the file transfer method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the file transfer method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the file transfer method in any other appropriate manner (e.g., by means of firmware).

[0201] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0202] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0203] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0204] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0205] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0206] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0207] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0208] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A file transmission method, wherein: The method is performed by a first device, where the first device is a resource-constrained device, and includes: Acquiring data processing capability of the first device itself; Sending a control frame to the second device according to the data processing capability, the control frame including at least sending constraint information; A data frame is received which is sent by the second device based on the sending constraint information, wherein the data frame includes one or more data blocks of the target file to be transmitted.

2. The method according to claim 1, wherein: The sending a control frame to the second device according to the data processing capability includes: Determining historical transmission information of the target file; Determining the sending constraint information according to the data processing capability and the historical transmission information, wherein the sending constraint information includes at least one of the number of data frames that can be continuously received, the time interval between data frames, the length of the received file, and the maximum length of data that can be sent by the second device; The control frame is generated according to the sending constraint information, and the control frame is sent to the second device.

3. The method according to claim 2, wherein: The generating the control frame according to the sending constraint information comprises: Determine an information field corresponding to each information item in the sending constraint information in the control frame; The corresponding information item is written into the information field, and a frame type indicator is written into the control frame to obtain the control frame.

4. The method according to claim 1, wherein: The method further comprises: In response to satisfying the update condition, the data processing capability and available resources of the first device itself are updated to generate a new control frame, and the new control frame is sent to the second device.

5. The method according to claim 1, wherein: After the receiving the data frame sent by the second device based on the sending constraint information, the method further includes: Parsing the data block from the data frame and buffering the data block in a first buffer in the first device; During the process of the first cache caching the data blocks, the cached data blocks are read from the first cache and written into the memory of the first device.

6. The method according to claim 5, wherein: The method further comprises: Wake up the data receiving thread and the data writing thread; Receive the data frame through the data receiving thread, and cache the data blocks in the data frame into the first cache; The data block is read from the first cache by the data writing thread, and is written into the memory of the first device.

7. The method according to any one of claims 1 to 6, wherein: The method further comprises: An end frame sent by the second device is received, where the end frame is used to indicate that the target file has been sent completely.

8. The method according to claim 7, wherein: After receiving the end frame sent by the second device, the method further includes: Determine a first total length and a sent length of the target file according to the end frame; Obtaining a second total length and a received length of the target file in the memory of the first device; The integrity of the target file is verified according to the first total length and the second total length, and the sent length and the received length.

9. The method according to any one of claims 1 to 6, wherein: Before acquiring the data processing capability, the method further includes: A request frame sent by the second device is received, where the request frame is used to request the first device to send the target file, and the request frame at least includes description information of the target file.

10. A file transmission method, wherein: Executed by a second device, the method includes: receiving a control frame sent by a first device, where the control frame is determined at least according to a data processing capability of the first device itself and includes at least sending constraint information; Based on the sending constraint information, a data frame is sent to the first device, wherein the data frame includes one or more data blocks of the target file to be transmitted.

11. The method according to claim 10, wherein: The sending constraint information includes at least one of the number of data frames that can be continuously received, the time interval between data frames, the length of the received file, and the maximum length of data that can be sent by the second device.

12. The method according to claim 11, wherein: The sending of the data frame to the first device based on the sending constraint information includes: Parsing the control frame to obtain a frame type indicator; In response to the frame type indicator being the control frame indicator, determining an information field corresponding to each information item in the sending constraint information in the control frame, and extracting the corresponding information item from the information field; A sending policy is configured for the second device according to the information item, and a data frame is sent to the first device according to the sending policy configuration.

13. The method according to claim 10, wherein: The sending of the data frame to the first device based on the sending constraint information includes: Reading the data block of the target file from the memory of the second device and caching it in the second cache of the second device; During the process of caching the data block in the second cache, based on the sending constraint information, the cached data block is read from the second cache and sent to the first device.

14. The method according to claim 13, wherein: The method further comprises: Wake up the data reading thread and the data sending thread; Reading the data block from the memory of the second device through the data reading thread, and caching the data block into the second cache; The data block is read from the second cache and sent to the first device through the data sending thread based on the sending constraint information.

15. The method according to any one of claims 10 to 14, wherein: The method further comprises: An end frame is sent to the first device, wherein the end frame is used to indicate to the first device that the target file has been sent completely.

16. The method according to claim 15, wherein: The method further comprises: Determine a first total length and a sent length of the target file; The end frame is generated according to the first total length and the sent length, and the first total length and the sent length are used to verify the integrity of the target file.

17. The method according to any one of claims 10 to 15, wherein: Before receiving the control frame sent by the first device, the method further includes: A request frame is sent to the first device, where the request frame is used to request the first device to send the target file, and the request frame includes at least description information of the target file.

18. A file transmission device, wherein: The method is performed by a first device, where the first device is a resource-constrained device and includes: A first acquisition module, used to acquire the data processing capability of the first device itself; A sending module, configured to send a control frame to the second device according to the data processing capability, wherein the control frame at least includes sending constraint information; The receiving module is used to receive a data frame sent by the second device based on the sending constraint information, wherein the data frame includes one or more data blocks of the target file to be transmitted.

19. The device according to claim 18, wherein: The sending module comprises: Determining historical transmission information of the target file; Determining the sending constraint information according to the data processing capability and the historical transmission information, wherein the sending constraint information includes at least one of the number of data frames that can be continuously received, the time interval between data frames, the length of the received file, and the maximum length of data that can be sent by the second device; The control frame is generated according to the sending constraint information, and the control frame is sent to the second device.

20. The device according to claim 19, wherein The sending module comprises: Determine an information field corresponding to each information item in the sending constraint information in the control frame; The corresponding information item is written into the information field, and a frame type indicator is written into the control frame to obtain the control frame.

21. The device according to claim 18, wherein The device also includes: In response to satisfying the update condition, the data processing capability and available resources of the first device itself are updated to generate a new control frame, and the new control frame is sent to the second device.

22. The device according to claim 18, wherein The receiving module further includes: Parsing the data block from the data frame and buffering the data block in a first buffer in the first device; During the process of the first cache caching the data blocks, the cached data blocks are read from the first cache and written into the memory of the first device.

23. The device according to claim 22, wherein: The device also includes: Wake up the data receiving thread and the data writing thread; Receive the data frame through the data receiving thread, and cache the data blocks in the data frame into the first cache; The data block is read from the first cache by the data writing thread, and is written into the memory of the first device.

24. The device according to any one of claims 18 to 23, wherein: The device also includes: An end frame sent by the second device is received, where the end frame is used to indicate that the target file has been sent completely.

25. The device according to claim 24, wherein: The device further comprises: Determine a first total length and a sent length of the target file according to the end frame; Obtaining a second total length and a received length of the target file in the memory of the first device; The integrity of the target file is verified according to the first total length and the second total length, and the sent length and the received length.

26. The device according to any one of claims 18 to 23, wherein: The first acquisition module further includes: A request frame sent by the second device is received, where the request frame is used to request the first device to send the target file, and the request frame at least includes description information of the target file.

27. A file transmission device, wherein: Executed by the second device, including: A receiving module, configured to receive a control frame sent by a first device, wherein the control frame is determined at least according to a data processing capability of the first device itself and includes at least sending constraint information; A sending module is used to send a data frame to the first device based on the sending constraint information, wherein the data frame includes one or more data blocks of the target file to be transmitted.

28. The device according to claim 27, wherein The sending constraint information includes at least one of the number of data frames that can be continuously received, the time interval between data frames, the length of the received file, and the maximum length of data that can be sent by the second device.

29. The device according to claim 27, wherein: The sending module comprises: Parsing the control frame to obtain a frame type indicator; In response to the frame type indicator being the control frame indicator, determining an information field corresponding to each information item in the sending constraint information in the control frame, and extracting the corresponding information item from the information field; A sending policy is configured for the second device according to the information item, and a data frame is sent to the first device according to the sending policy configuration.

30. The device according to claim 27, wherein: The sending module comprises: Reading the data block of the target file from the memory of the second device and caching it in the second cache of the second device; During the process of caching the data block in the second cache, based on the sending constraint information, the cached data block is read from the second cache and sent to the first device.

31. The device according to claim 30, wherein The device also includes: Wake up the data reading thread and the data sending thread; Reading the data block from the memory of the second device through the data reading thread, and caching the data block into the second cache; The data block is read from the second cache and sent to the first device through the data sending thread based on the sending constraint information.

32. The device according to any one of claims 27 to 31, wherein: The device also includes: An end frame is sent to the first device, wherein the end frame is used to indicate to the first device that the target file has been sent completely.

33. The device according to claim 32, wherein: The device also includes: Determine a first total length and a sent length of the target file; The end frame is generated according to the first total length and the sent length, and the first total length and the sent length are used to verify the integrity of the target file.

34. The device according to any one of claims 27 to 32, wherein: The receiving module further includes: A request frame is sent to the first device, where the request frame is used to request the first device to send the target file, and the request frame includes at least description information of the target file.

35. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9 or 10-17.

36. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9 or 10-17.

37. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1-9 or 10-17.