Data breakpoint transmission method, device, equipment and program product

By creating cache and record files of mapping collections, combined with the update and search mechanism of breakpoint identification, the problem of long-term and low-efficiency caused by interruption of Bluetooth data transmission is solved, and the reliable data resumption and efficiency improvement is achieved.

CN120050278AActive Publication Date: 2025-05-27ROYPOW TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510481792.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-05-27
Estimated Expiration
2045-04-17

AI Technical Summary

Technical Problem

In the prior art, Bluetooth data transmission is easily interrupted when the signal is unstable or the equipment is far apart, resulting in a long transmission time and low efficiency.

Method used

Data breakpoint transmission is achieved by creating a cache of mapped collections, recording files and breakpoint identifications. The specific steps include obtaining the data to be transferred, creating a mapping set and recording file, sending a data array and updating the breakpoint identifier, and finding and sending the data to be transferred based on the breakpoint identifier after the interruption.

Benefits of technology

It realizes reliable data transmission after interruption, reduces data transmission time and improves data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050278A_ABST
    Figure CN120050278A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data transmission, in particular to a data breakpoint transmission method and device, equipment and a program product. The method comprises the following steps: acquiring to-be-transmitted data; creating a cache of a mapping set according to the to-be-transmitted data, wherein the mapping set comprises a mapping identifier of the to-be-transmitted data and an array corresponding to the mapping identifier; creating a record file according to the to-be-transmitted data, setting a breakpoint identifier in the record file, and writing the mapping set into the record file; the array of the data to be transmitted is sent, and the breakpoint identifier in the record file is updated according to the successfully sent response message; according to the technical scheme, after the sending of the data to be transmitted is interrupted, the corresponding mapping identifier is searched for in the mapping set in the record file according to the breakpoint identifier in the record file, and the data to be continuously transmitted is searched for and sent according to the mapping identifier, so that the data can still be reliably continuously transmitted after the data is interrupted, the data transmission time is shortened, and the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of technology, Bluetooth technology has been continuously evolving, and its applications in the field of wireless device connection are increasing. Bluetooth technology is convenient to use and does not rely on network connection. As long as the distance between devices is within a reasonable range, Bluetooth transmission of files can be easily achieved. However, Bluetooth transmission also has limitations. In the case of too far distance between devices or unstable signal, the transmission process may encounter interruptions.

[0003] Taking the firmware upgrade of a device by a mobile phone App via Bluetooth as an example, if the transmission is interrupted due to unstable signal or exhausted mobile phone battery, the user needs to reconnect and re-transmit, resulting in a long data transmission time and low data transmission efficiency. Summary of the Invention

[0004] In view of this, embodiments of this application provide a data breakpoint transmission method, apparatus, device, and program product to solve the problem of long data transmission time and low data transmission efficiency in the prior art when the transmission is interrupted.

[0005] The first aspect of the embodiments of this application provides a data breakpoint transmission method, and the method includes: Obtain data to be transmitted; Create a cache of a mapping set according to the data to be transmitted, where the mapping set includes a mapping identifier of the data to be transmitted and an array corresponding to the mapping identifier, and the array is generated by dividing the data to be transmitted; Create a record file according to the data to be transmitted, set a breakpoint identifier in the record file, and write the mapping set into the record file; Send the array of the data to be transmitted, and update the breakpoint identifier in the record file according to the successful transmission response message; After the transmission of the data to be transmitted is interrupted, according to the breakpoint identifier in the record file, find the corresponding mapping identifier in the mapping set in the record file, and find and send the data to be re-transmitted according to the mapping identifier.

[0006] In combination with the first aspect, in the first possible implementation manner of the first aspect, creating a cache of a mapping set according to the data to be transmitted includes: Read data from the data to be transmitted in sequence to generate data according to a predetermined array capacity size; Set the mapping identifiers corresponding to the generated arrays in sequence; Create a cache of the mapping set in the form of key-value pairs according to the mapping identifier and the array.

[0007] Combined with the first aspect, in the second possible implementation manner of the first aspect, send the array of the data to be transmitted, and update the breakpoint identifier in the record file according to the response message indicating successful transmission, including: Generate data blocks according to the array and the mapping identifier; Send the data blocks in sequence according to the order of the mapping identifier; When receiving the response message of the data block, update the breakpoint identifier in the record file to the mapping identifier in the response message.

[0008] Combined with the second possible implementation manner of the first aspect, in the third possible implementation manner of the first aspect, send the data blocks in sequence according to the order of the mapping identifier, including: Send the data blocks in sequence according to the order of the mapping identifier in the sending manner of the stop-and-wait protocol; When receiving the response message of the data block, update the breakpoint identifier in the record file to the mapping identifier in the response message, including: When receiving the response message of the data block, update the breakpoint identifier in the record file to the mapping identifier in the received response message.

[0009] Combined with the second possible implementation manner of the first aspect, in the fourth possible implementation manner of the first aspect, send the data blocks in sequence according to the order of the mapping identifier, including: Send at least two of the data blocks in the sliding window continuously in sequence according to the order of the mapping identifier in the sending manner of the sliding window protocol; When receiving the response message of the data block, update the breakpoint identifier in the record file to the mapping identifier in the response message, including: When receiving the response message of the data block, update at least two of the breakpoint identifiers set in the record file to the mapping identifiers in the response messages corresponding to the data blocks in the sliding window received.

[0010] Combined with the first aspect, in the fifth possible implementation manner of the first aspect, after the transmission of the data to be transmitted is interrupted, find the corresponding mapping identifier in the mapping set in the record file according to the breakpoint identifier in the record file, and find and send the data to be continued according to the mapping identifier, including: After the interruption of sending the data to be transmitted, when it is detected that there is still a cache of the mapping set corresponding to the data to be transmitted, according to the breakpoint identifier in the record file, find the corresponding mapping identifier in the cache, and find and send the data to be continued according to the mapping identifier; After the interruption of sending the data to be transmitted, when it is detected that there is no cache of the mapping set corresponding to the data to be transmitted, generate key-value pair data of the mapping identifier and the array according to the data in the record file, and find and send the data to be continued according to the breakpoint identifier in the key-value pair data.

[0011] Combined with the first aspect to the fifth possible implementation manner of the first aspect, in the sixth possible implementation manner of the first aspect, after sending the array of the data to be transmitted and updating the breakpoint identifier in the record file according to the response message indicating successful sending, the method further includes: After detecting that all the data to be transmitted is successfully sent, delete the record file.

[0012] A second aspect of the embodiments of the present application provides a data breakpoint transmission device, and the device includes: A data acquisition unit, configured to acquire data to be transmitted; A mapping unit, configured to create a cache of a mapping set according to the data to be transmitted, where the mapping set includes a mapping identifier of the data to be transmitted and an array corresponding to the mapping identifier, and the array is generated by dividing the data to be transmitted; A recording unit, configured to create a record file according to the data to be transmitted, set a breakpoint identifier in the record file, and write the mapping set into the record file; A breakpoint identifier update unit, configured to send the array of the data to be transmitted and update the breakpoint identifier in the record file according to the response message indicating successful sending; A resume transmission unit, configured to, after the interruption of sending the data to be transmitted, according to the breakpoint identifier in the record file, find the corresponding mapping identifier in the mapping set in the record file, and find and send the data to be continued according to the mapping identifier.

[0013] A third aspect of the embodiments of the present application provides a data breakpoint transmission device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the data breakpoint transmission device implements the method according to any one of the first aspect.

[0014] A fourth aspect of the embodiments of the present application provides a computer program product, which, when running on a computer, causes the computer to execute the method according to the first aspect or its various implementation manners.

[0015] The fifth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of the first aspect are implemented.

[0016] The sixth aspect of the embodiments of the present application provides a chip for implementing the methods in the various implementation manners of the first aspect above. Specifically, the chip includes: a processor for calling and running a computer program from a memory, so that a device installed with the chip executes the method according to the first aspect or its various implementation manners above.

[0017] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: The embodiments of the present application create a cache of a mapping set according to the data to be transmitted, write the mapping set and the breakpoint identifier into the created record file, and update the breakpoint identifier in the record file according to the response message indicating successful transmission of the array when sending the array of data to be transmitted. After the data transmission is interrupted, the corresponding mapping identifier can be found in the record file according to the breakpoint identifier, and the data to be continued to be transmitted can be found and sent based on the mapping identifier, so that the data can still be reliably continued to be transmitted after the interruption, which is beneficial to reducing the data transmission time and improving the data transmission efficiency. Description of the Drawings

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0019] Figure 1 is a schematic diagram of an implementation scenario of a data breakpoint transmission method provided by an embodiment of the present application; Figure 2 is a schematic diagram of an implementation process of a data breakpoint transmission method provided by an embodiment of the present application; Figure 3 is a schematic diagram of a mapping set provided by an embodiment of the present application; Figure 4 is a schematic diagram of a data structure in a record file provided by an embodiment of the present application; Figure 5 is a schematic diagram of transmitting data according to a sliding window provided by an embodiment of the present application; Figure 6 is a schematic diagram of a data breakpoint transmission device provided by an embodiment of the present application; Figure 7 is a schematic diagram of a data breakpoint transmission device provided by an embodiment of the present application. Detailed implementation manners

[0020] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system architectures, technologies, etc. are presented in order to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from hindering the description of the present application.

[0021] In order to illustrate the technical solutions described in the present application, the following will be described through specific embodiments.

[0022] With the progress of technology, Bluetooth technology plays an increasingly important role in the field of wireless communication. It is known for its simplicity, allowing devices to conveniently transfer files as long as they are within a suitable distance from each other without network support. However, Bluetooth transmission also faces challenges in some cases. For example, when the devices are far apart or the signal quality is poor, the transmission may be interrupted.

[0023] For example, when a user attempts to update the firmware of a certain device using Bluetooth technology through a mobile phone application, if the transmission is aborted due to unstable signal or insufficient battery power of the mobile phone, the user will have to re - establish the connection and start the transmission from the beginning. This not only prolongs the data transmission time but also reduces the transmission efficiency.

[0024] Therefore, the embodiments of the present application propose a data breakpoint transmission method, as Figure 1 shown in the schematic diagram of the implementation scenario of this method. In the implementation scenario of data breakpoint transmission, it includes a data breakpoint transmission device 1 and a data receiving device 2.

[0025] Among them, the data breakpoint transmission device 1 can include intelligent devices such as mobile phones, tablets, servers, etc. The data receiving device can include devices such as inverters or other embedded devices that need to perform firmware upgrades. The data transmission link between the data breakpoint transmission device 1 and the data receiving device 2 can include, for example, a Bluetooth link, a Wifi link, etc.

[0026] The data breakpoint transmission device 1 includes data to be transmitted 10 and a record file 11. The data to be transmitted can be divided into at least two arrays according to the data group capacity, and each array corresponds to a mapping identifier. In the record file 11, the data to be transmitted with the added mapping identifier can be written. When the data breakpoint transmission device 1 sends the data to be transmitted to the data receiving device 2, when the data receiving device 2 receives an array including the mapping identifier, it will send a response message to the data breakpoint transmission device 1. The data breakpoint transmission device 1 updates the breakpoint identifier in the record file 11 according to the mapping identifier included in the response message. After the transmission of the data to be transmitted is interrupted, the array with the breakpoint identifier as the mapping identifier can be found according to the breakpoint identifier in the record file 11, so that the data to be continued to be transmitted can be sent reliably and effectively, improving the efficiency and reliability of data transmission.

[0027] Figure 2 FIG. 4 is a schematic flowchart of an implementation of a data breakpoint transmission method provided by an embodiment of the present application, which is described in detail as follows: In S201, the data to be transmitted is obtained.

[0028] The data to be transmitted in the embodiment of the present application may include, for example, firmware upgrade data, parameter configuration data, etc.

[0029] The data to be transmitted in the embodiment of the present application may be data in the BIN file format for firmware upgrade. The BIN file is in binary format and can directly contain the original data of the firmware without going through compression or encoding processing, thereby effectively improving the accuracy and integrity of the firmware file during transmission and writing.

[0030] When obtaining the data to be transmitted, the data identification information of the data to be transmitted can be obtained. For example, when the data to be transmitted is a BIN file for firmware upgrade, since the BIN file is used for firmware upgrade, the version information of the BIN file upgrade can be used as the data identification information. By using the version information of the data to be transmitted as the data identification information, different versions of firmware upgrade data can be effectively distinguished, which is beneficial to improving the identification degree of the data to be transmitted.

[0031] In S202, a cache of a mapping set is created according to the data to be transmitted, and the mapping set includes the mapping identifier of the data to be transmitted and the array corresponding to the mapping identifier.

[0032] Wherein, the array is generated according to the data to be transmitted.

[0033] In order to facilitate the resumption of transmission of the data to be transmitted, in the embodiment of the present application, the data to be transmitted can be sequentially segmented according to a predetermined array capacity to obtain at least two arrays formed by dividing the data to be transmitted. Among them, the array capacity is smaller than the capacity of the data to be transmitted.

[0034] For at least two arrays obtained by partitioning, mapping identifiers can be added to the arrays according to the order of the arrays in the data to be transmitted. The mapping identifier is the identifier mapped to the array. The position of the array can be quickly located according to the mapping identifier.

[0035] For example Figure 3 As shown in the figure, assume that the size of the BIN file of the data to be transmitted is 10,000 bytes, and the capacity of a single array is 1,000 bytes. For the data to be transmitted, it can be read starting from the first byte. After reading 1,000 bytes, the first array, i.e., array 1, is obtained. It can be set that array 1 corresponds to the mapping identifier 1. Then, starting from the 1,001st byte, after reading 1,000 bytes, the second array, i.e., array 2, is obtained. It can be set that array 2 corresponds to the mapping identifier 2. Read sequentially backward according to this method until the last byte of the data to be transmitted, such as the 10,000th byte of the data to be transmitted, and set the last array, i.e., array 10, to correspond to the mapping identifier 10. According to the established correspondence between the arrays and the mapping identifiers, a mapping set is obtained, that is, a set of arrays and mapping identifiers.

[0036] The mapping set in the embodiment of the present application can be stored in the cache in the form of key-value pairs. For example, for the mapping identifier 0, it can be used as the key, and the data from the 1st byte to the 1,000th byte corresponding to the mapping identifier 0 is used as the value. The correspondence between the mapping identifier and the array is cached in the form of key-value. For the correspondence between other mapping identifiers and arrays, it can also be cached in the form of key-value. Caching the correspondence between the mapping identifier and the array in the form of key-value pairs enables quick access to the array through the key, which is beneficial to improving the data access efficiency.

[0037] In S203, a record file is created according to the data to be transmitted, a breakpoint identifier is set in the record file, and the mapping set is written into the record file.

[0038] To facilitate recording the current sending progress, a record file can be created according to the data to be transmitted in the embodiment of the present application. The name of the record file can include the version information of the data to be transmitted. For example, the version information of the file to be transmitted can be directly used as the name of the record file, thereby establishing the relationship between the record file and the data to be transmitted. Without limitation, the relationship between the record file and the data to be transmitted can also be established according to other identification information of the file to be transmitted, including, for example, the summary information of the file to be transmitted. For example, the summary information of the file to be transmitted can be directly used as the name of the record file.

[0039] The record file in the embodiments of the present application is used to record mapping identifiers and arrays. The position of the array in the record file and the position of the mapping identifier in the record file can be determined according to the preset array capacity size. The record file can be a file in TXT text format, etc. As Figure 4 shown, when the mapping identifier occupies one byte and the length of the array is m bytes, if the position of the first mapping identifier is the a-th byte (a is a natural number, and the first a bytes can be set as breakpoint identifiers), then the position of the n-th mapping identifier is the (a + (m + 1) * (n - 1))-th byte, and the position of the first character of the array corresponding to the n-th mapping identifier is a + 1 + (m + 1) * (n - 1).

[0040] The record file in the embodiments of the present application includes breakpoint identifiers (TAGs), and the breakpoint identifier can be the latest identifier of the array that has been successfully sent. Due to different data sending protocols, the number of breakpoint identifiers can include one or at least two.

[0041] For example, when the array sending protocol is the stop-and-wait protocol, one breakpoint identifier can be set. When the array sending protocol is the sliding window protocol, the number of breakpoint identifiers can be determined according to the number of arrays included in the sliding window. For example, when the number of arrays in the sliding window protocol is 3, the number of breakpoint identifiers can be set to 3, which are respectively used to record the sending status of the 3 arrays in the sliding window.

[0042] In S204, send the array of the data to be transmitted, and update the breakpoint identifier in the record file according to the response message indicating successful sending.

[0043] When sending data, data blocks can be generated according to the arrays. A data block can include a single array and the mapping identifier corresponding to the array. When sending data, the data blocks can be sent in order according to the order of the mapping identifiers.

[0044] After the data block is sent to the data receiving device, the data receiving device will return a response message. The response message includes the mapping identifier of the array and an identifier indicating whether the reception is successful. When it is detected that the data block corresponding to the mapping identifier has been successfully received, the mapping identifier can be updated in the breakpoint identifier in the record file, indicating that the array corresponding to the mapping identifier has been successfully sent and received.

[0045] The sending methods of the data to be transmitted in the embodiments of the present application can include the stop-and-wait protocol and the sliding window protocol. Among them, the stop-and-wait protocol is to send one data block each time until the data is successfully received, that is, after receiving the response message indicating successful sending, update the breakpoint identifier to the mapping identifier of the data block, and send the next data block.

[0046] For example, the initialized breakpoint identifier is 0. After sending the first data block, if a response message indicating successful transmission is received, the breakpoint identifier can be updated to the mapping identifier of the first data block, indicating that the first data block has been successfully sent. If a data interruption occurs at this time, based on the current breakpoint identifier, the first data block can be searched backward from the breakpoint identifier, and the second data block is determined as the data block to be continuously transmitted.

[0047] The number of data blocks sent each time in the sliding window protocol is the number of data blocks included in the sliding window. If there are 3 data blocks included in the sliding window, 3 breakpoint identifiers can be set. After the data block with the smallest mapping identifier in the currently sent 3 data blocks is successfully received, the sliding window is slid backward. The step size of the sliding window is determined according to the smallest mapping identifier of the data blocks that have not been successfully sent in the current sliding window, so that the data blocks sent in the sliding window start from the smallest mapping identifier, and the newly sent data blocks are determined according to the sliding window length.

[0048] For example Figure 5 As shown, the data blocks sent in parallel for the first time are 1, 2, and 3. If response messages indicating successful transmission of data blocks 1, 2, and 3 are received, the breakpoint identifiers initialized to 0 are updated to 1, 2, and 3 respectively, and the sliding window is slid backward by 3 steps to send data blocks 4, 5, and 6. If only a response message indicating successful transmission of data block 1 is received after sending data blocks 1, 2, and 3, then one of the breakpoint identifiers is updated to 1, and the other two breakpoint identifiers remain 0. At this time, the smallest mapping identifier of the data blocks that have not been successfully sent is 2. Starting from 2 and with a window length of 3, data blocks 2, 3, and 4 are determined as the currently being sent data blocks. When a response message indicating successful transmission of data block 2, 3, or 4 is received, the smallest identifier in the breakpoint identifiers is updated to the currently successful response identifier. For example, after data blocks 2 and 3 are successfully sent, the two breakpoint identifiers with a value of 0 in the breakpoint identifiers are updated to 2 and 3 respectively. At this time, the smallest mapping identifier of the data blocks that have not been successfully sent is 4, so data blocks 4, 5, and 6 are determined as the currently sent data blocks. If the transmission is successful, for example, data block 5 is successfully sent, then the smallest breakpoint identifier 1 is updated to 5, and it is determined that the mapping identifier of the data blocks that have not been successfully sent is still 4. At this time, the currently sent data blocks are not updated temporarily. At this time, if the transmission is interrupted, based on the 2, 3, and 5 recorded in the breakpoint identifiers, the smallest mapping identifier of the data blocks that have not been successfully sent can be determined. The first missing identifier found in the increasing direction starting from the smallest identifier of the breakpoint identifiers is the mapping identifier to be continuously transmitted. For example, if the breakpoint identifiers only record 2, 3, and 5, and the first missing consecutive identifier is 4, then the array corresponding to the mapping identifier 4 is determined as the data to be continuously transmitted.

[0049] In S205, after the interruption of the transmission of the data to be transmitted, according to the breakpoint identifier in the record file, find the corresponding mapping identifier in the mapping set in the record file, and find and transmit the data to be continued according to the mapping identifier.

[0050] According to the response message after the data block is sent, the value of the breakpoint identifier can be updated in real time, and the mapping identifier corresponding to the latest successfully sent data block is updated to the breakpoint identifier. If the transmission is interrupted, the data to be continued can be determined according to the breakpoint identifier, and the breakpoint resume transmission can be performed according to the determined data to be continued, so as to reduce the probability of data duplicate transmission and improve the data transmission efficiency.

[0051] In addition, in the embodiment of the present application, when it is determined that the transmission of the data to be transmitted is interrupted, if the response message indicating successful reception is not received within a specified duration, the transmission can be repeated a specified number of times, for example, three times can be repeated. If the response is still not successful after repeating the specified number of times, it can be determined that the transmission of the data to be transmitted is interrupted, and the data to be continued can be determined according to the breakpoint identifier saved in the record file.

[0052] In addition, after the data to be continued is determined according to the mapping identifier in the embodiment of the present application, if the reconnection is successful, the cache can be searched first to determine whether the data can be paired by key (key) - value (value) in the cache, and the array corresponding to the mapping identifier of the data to be continued is searched. If so, the data block generated by the array in the cache is directly used for resume transmission. If the array corresponding to the mapping identifier of the data to be continued cannot be found in the cached data, the mapping identifier and the array in the record file, and the key - value pair data of the cached mapping identifier and the array can be cached, so that the data to be continued can be quickly located in the key - value pair cache according to the breakpoint identifier.

[0053] When all the data to be transmitted is successfully transmitted, the record file can be deleted, such as deleting the text file including the breakpoint identifier and the mapping set, etc., so as to release the storage space.

[0054] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution is prior or posterior. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0055] Figure 6 The following is a schematic diagram of a data breakpoint transmission device provided by an embodiment of the present application. The device includes: A data acquisition unit 601, configured to acquire data to be transmitted; A mapping unit 602, configured to create a cache of a mapping set according to the data to be transmitted, where the mapping set includes a mapping identifier of the data to be transmitted and an array corresponding to the mapping identifier, and the array is generated by dividing the data to be transmitted; A recording unit 603, configured to create a recording file according to the data to be transmitted, set a breakpoint identifier in the recording file, and write the mapping set into the recording file; A breakpoint identifier updating unit 604, configured to send an array of the data to be transmitted, and update the breakpoint identifier in the recording file according to a response message indicating successful sending; A resume transmission unit 605, configured to, after the transmission of the data to be transmitted is interrupted, find a corresponding mapping identifier in the mapping set in the recording file according to the breakpoint identifier in the recording file, and find and send the data to be resumed according to the mapping identifier.

[0056] Figure 6 The data breakpoint transmission device shown corresponds to Figure 2 the data breakpoint transmission method shown.

[0057] Figure 7 is a schematic diagram of a data breakpoint transmission device provided by an embodiment of the present application. As Figure 7 shown, the data breakpoint transmission device 7 of this embodiment includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70, such as a data breakpoint transmission program. When the processor 70 executes the computer program 72, the steps in the above-mentioned various embodiments of the data breakpoint transmission method are implemented. Alternatively, when the processor 70 executes the computer program 72, the functions of each module / unit in the above-mentioned device embodiments are implemented.

[0058] Exemplarily, the computer program 72 may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 71 and executed by the processor 70 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 72 in the data breakpoint transmission device 7.

[0059] The data breakpoint transmission device 7 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The data breakpoint transmission device may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art can understand that Figure 7It is merely an example of the data breakpoint transfer device 7 and does not constitute a limitation on the data breakpoint transfer device 7. It may include more or fewer components than those shown, or combine certain components, or different components. For example, the data breakpoint transfer device may also include an input / output device, a network access device, a bus, etc.

[0060] The so-called processor 70 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

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

[0062] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be assigned to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.

[0063] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0064] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in the form of hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0065] In the embodiments provided in this application, it should be understood that the disclosed device / terminal device and method can be implemented in other ways. For example, the device / terminal device embodiments described above are only illustrative. For example, the division of the module or unit is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.

[0066] The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it can be located in one place, or it can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

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

[0068] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods of the present application can also be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

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

[0070] The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A data breakpoint transmission method, characterized in that: The method comprises: Get the data to be transmitted; Creating a cache of a mapping set according to the data to be transmitted, the mapping set including a mapping identifier of the data to be transmitted and an array corresponding to the mapping identifier, the array being generated according to the division of the data to be transmitted; Creating a record file according to the data to be transmitted, setting a breakpoint identifier in the record file, and writing the mapping set into the record file; Send the array of data to be transmitted, and update the breakpoint mark in the record file according to the response message of successful sending; After the sending of the data to be transmitted is interrupted, the corresponding mapping identifier is searched for in the mapping set in the record file according to the breakpoint identifier in the record file, and the data to be resumed is searched and sent according to the mapping identifier.

2. The method according to claim 1, characterized in that Creating a cache of a mapping set according to the data to be transmitted includes: Reading data from the data to be transmitted in sequence to generate data according to a predetermined array capacity; Set the mapping identifiers corresponding to the generated arrays in sequence; According to the mapping identifier and array, a cache of the mapping collection is created in the form of key-value pairs.

3. The method according to claim 1, characterized in that Sending the array of data to be transmitted, and updating the breakpoint identifier in the record file according to a response message of successful sending, including: Generate a data block according to the array and the mapping identifier; Sending the data blocks in sequence according to the order of the mapping identifiers; When a response message of the data block is received, the breakpoint identifier in the record file is updated to the mapping identifier in the response message.

4. The method according to claim 3, characterized in that Sending the data blocks in sequence according to the order of the mapping identifiers includes: According to the order of the mapping identifiers, the data blocks are sent in sequence in accordance with a sending mode of a stop-and-wait protocol; When receiving the response message of the data block, updating the breakpoint identifier in the record file to the mapping identifier in the response message includes: When a response message of the data block is received, the breakpoint identifier in the record file is updated to the mapping identifier in the received response message.

5. The method according to claim 3, characterized in that: Sending the data blocks in sequence according to the order of the mapping identifiers includes: According to the order of the mapping identifiers and the sending mode of the sliding window protocol, at least two of the data blocks in the sliding window are sent in sequence and continuously; When receiving the response message of the data block, updating the breakpoint identifier in the record file to the mapping identifier in the response message includes: When a response message of the data block is received, at least two breakpoint identifiers set in the record file are updated to mapping identifiers in the received response message corresponding to the data block in the sliding window.

6. The method according to claim 1, characterized in that After the transmission of the data to be transmitted is interrupted, searching for a corresponding mapping identifier in a mapping set in the record file according to the breakpoint identifier in the record file, and searching and sending the data to be resumed according to the mapping identifier, including: After the transmission of the data to be transmitted is interrupted, when it is detected that the cache of the mapping set corresponding to the data to be transmitted still exists, according to the breakpoint identifier in the record file, the corresponding mapping identifier is searched in the cache, and the data to be resumed is searched and sent according to the mapping identifier; After the sending of the data to be transmitted is interrupted, when it is detected that the cache of the mapping set corresponding to the data to be transmitted does not exist, a mapping identifier and an array key-value pair data are generated according to the data in the record file, and the data to be resumed is searched and sent in the key-value pair data according to the breakpoint identifier.

7. The method according to any one of claims 1 to 6, characterized in that: After sending the array of data to be transmitted and updating the breakpoint identifier in the record file according to a response message of successful sending, the method further includes: After detecting that all the data to be transmitted are sent successfully, the record file is deleted.

8. A data breakpoint transmission device, characterized in that: The device comprises: A data acquisition unit, used for acquiring data to be transmitted; A mapping unit, configured to create a cache of a mapping set according to the data to be transmitted, wherein the mapping set includes a mapping identifier of the data to be transmitted and an array corresponding to the mapping identifier, and the array is generated according to the division of the data to be transmitted; A recording unit, configured to create a recording file according to the data to be transmitted, set a breakpoint identifier in the recording file, and write the mapping set into the recording file; A breakpoint identification updating unit, used for sending the array of data to be transmitted, and updating the breakpoint identification in the record file according to a response message of successful sending; The resuming unit is used to search for a corresponding mapping identifier in the mapping set in the record file according to the breakpoint identifier in the record file after the sending of the data to be transmitted is interrupted, and search and send the data to be resumed according to the mapping identifier.

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

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

Citation Information

Patent Citations

  • Method and system for realizing breakpoint resume of network data transmission

    CN102761614A

  • Cloud data rapid storage method and apparatus

    CN108347459A

  • Flexible data transmission method of flexible data transmission protocol based on TCP / IP protocol

    CN110830472A

  • Task breakpoint resuming method applied to data cleaning tool

    CN110928863A

  • Database-based breakpoint resume method and related device

    CN113704277A