CN114390096A - Data transmission method, equipment and device based on NB-IoT - Google Patents

Data transmission method, equipment and device based on NB-IoT Download PDF

Info

Publication number
CN114390096A
CN114390096A CN202111640782.1A CN202111640782A CN114390096A CN 114390096 A CN114390096 A CN 114390096A CN 202111640782 A CN202111640782 A CN 202111640782A CN 114390096 A CN114390096 A CN 114390096A
Authority
CN
China
Prior art keywords
data
iot
fragment
offset
piece
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111640782.1A
Other languages
Chinese (zh)
Inventor
刘妙莹
姚沛雯
吴峰
潘圣宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202111640782.1A priority Critical patent/CN114390096A/en
Publication of CN114390096A publication Critical patent/CN114390096A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • H04W28/065Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information using assembly or disassembly of packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/18Information format or content conversion, e.g. adaptation by the network of the transmitted or received information for the purpose of wireless delivery to users or terminals

Abstract

The invention discloses a data transmission method, equipment and a device based on NB-IoT (NB-IoT), which are used for solving the problem that extra networking is needed for transmitting big data through NB-IoT, firstly, format conversion is carried out on data to be transmitted to generate a character string; secondly, fragmenting the character string according to the maximum transmission unit of the NB-IoT and a preset length to generate a plurality of fragment data; thirdly, determining the offset corresponding to the fragment data according to the position of the fragment data in the data to be transmitted aiming at each fragment data; and finally, sending the plurality of fragmented data carrying the offset to a receiving end through NB-IoT, so that the receiving end can recombine the plurality of fragmented data according to the offset carried in each fragmented data. By the method, the data files with large volumes can be divided into the data which can be directly transmitted by NB-IoT, so that extra networking is not needed when the large data is transmitted by the NB-IoT, and the cost is reduced.

Description

Data transmission method, equipment and device based on NB-IoT
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to a data transmission method, device, and apparatus based on NB-IoT.
Background
The internet of things is a product which is extended and expanded on the basis of the internet, and any article is connected with the internet through information sensing equipment. Narrow-Band Internet of Things (NB-IoT) is one of the current common Internet of Things technologies, is constructed in a cellular network, has the characteristics of wide coverage, massive connection, low power consumption, low cost and the like, and has good application prospects in scenes such as intelligent monitoring, smart homes and the like.
Due to the characteristics of low power consumption and low network transmission rate of NB-IoT, efficient transmission can be realized for data with small sensor values and the like, but efficient transmission cannot be supported for files with large pictures and the like. The maximum length of data transmitted by a single NB-IoT chip is usually 512 bytes, and even a picture with a resolution of only 160 × 120 has a volume of about 5KB to 20KB, which is much larger than the upper limit of the single NB-IoT transmission. At present, when large files such as pictures need to be transmitted in an NB-IoT scene, another set of mobile hotspot (WIFI) or 4G network often needs to be built, and the networking process is complex and high in cost.
Disclosure of Invention
The invention provides a data transmission method, equipment and device based on NB-IoT (NB-IoT), which are used for solving the problem that extra networking is required for transmitting big data through NB-IoT in the prior art.
The method comprises the following steps:
in a first aspect, an embodiment of the present invention provides a data transmission method based on a narrowband internet of things NB-IoT, which is applied to a sending end, and the method includes:
carrying out format conversion on data to be transmitted to generate a character string;
fragmenting the character string according to the maximum transmission unit of the NB-IoT and a preset length to generate a plurality of fragment data;
for each piece of fragment data, determining the offset corresponding to the piece of fragment data according to the position of the piece of fragment data in the data to be transmitted;
and sending the plurality of fragment data carrying the offset to a receiving end through the NB-IoT so that the receiving end can recombine the plurality of fragment data according to the offset carried in each fragment data.
In a possible implementation manner, before performing format conversion on the data to be transmitted and generating the character string, the method further includes:
and allocating an identifier for the data to be transmitted.
In a possible embodiment, the preset length comprises a length of the identifier, a length of a flag, and a length of the offset;
the fragmenting the character string according to the maximum transmission unit of the NB-IoT and a preset length to generate a plurality of fragment data, including:
taking the difference between the maximum transmission unit of the NB-IoT and the length of the identifier, the length of the mark and the length of the offset as the length of the fragmented data;
and based on the length of the fragment data, fragmenting the character string to generate a plurality of fragment data.
In a possible embodiment, after the fragmenting the character string according to the maximum transmission unit of NB-IoT and the preset length to generate a plurality of fragment data, and before the transmitting the fragment data to the receiving end based on NB-IoT, the method further includes:
for each piece of fragment data, taking an identifier of data to be transmitted corresponding to the piece of fragment data as an identifier of the piece of fragment data;
determining the mark of the fragment data according to the position of the fragment data in the character string;
packaging the identifier, the mark, the offset and the fragment data to obtain packaged data;
the transmitting the fragmented data to the receiving end based on the NB-IoT comprises the following steps:
sending the encapsulated data to the receiving end based on the NB-IoT.
In a possible implementation manner, the determining, for each piece of fragment data, an offset corresponding to the piece of fragment data according to a position of the piece of fragment data in the character string includes:
taking the fragment data length as a unit offset;
and determining the offset according to the mark of the fragment data and the unit offset.
In a second aspect, an embodiment of the present invention provides a NB-IoT-based data transmission method, which is applied to a receiving end, and the method includes:
receiving a plurality of fragmented data sent by a sending end through the NB-IoT;
recombining the fragment data according to the offset in each fragment data to generate data to be restored, wherein the offset is determined by the sending end according to the position of the fragment data in the data to be transmitted;
and carrying out format conversion on the data to be restored to generate target data.
In a possible implementation manner, the reconstructing the plurality of fragment data according to a preset reconstruction policy to generate data to be restored includes:
according to the identifier and the mark in each piece of fragmented data, the completion of the transmission of the fragmented data with the same identifier is determined;
for each piece data of the same identifier, determining the arrangement sequence of a plurality of piece data of the same identifier according to the offset in each piece data, and deleting the identifier, the mark and the offset in each piece data to obtain a plurality of target piece data;
and recombining the target fragment data according to the arrangement sequence to generate the data to be restored.
In a third aspect, an embodiment of the present invention provides an NB-IoT-based data transmission device, which is applied to a sending end, and includes a processor, a memory, and a program stored on the memory and capable of running on the processor, where when the processor executes the program, the method according to any one of the first aspect can be implemented.
In a fourth aspect, an embodiment of the present invention provides an NB-IoT-based data transmission device, which is applied to a receiving end, and includes a processor, a memory, and a program stored in the memory and capable of running on the processor, where when the processor executes the program, the method according to the second aspect can be implemented.
In a fifth aspect, an embodiment of the present invention provides an NB-IoT-based data transmission apparatus, which is applied to a sending end, and includes:
the first conversion module is used for carrying out format conversion on data to be transmitted to generate a character string;
the fragmentation module is used for fragmenting the character string according to a preset fragmentation strategy to generate a plurality of fragmentation data;
the sending module is used for sending the fragmented data to a receiving end based on NB-IoT so that the receiving end can recombine a plurality of fragmented data.
In a sixth aspect, an embodiment of the present invention provides a NB-IoT-based data transmission apparatus, which is applied to a sending end, and includes:
the receiving module is used for receiving a plurality of fragmented data sent by the sending end based on NB-IoT;
the recombination module is used for recombining the fragment data according to a preset recombination strategy to generate data to be restored;
and the second conversion module is used for carrying out format conversion on the data to be restored.
In a seventh aspect, the present application also provides a computer-readable storage medium for storing a computer program or instructions, which when executed, enable the NB-IoT based data transmission method in the above aspects to be implemented.
In an eighth aspect, the present application also provides a computer program product comprising instructions which, when run on a computer, cause the method of the above aspects to be implemented.
The invention has the following beneficial effects:
the invention discloses a data transmission method, equipment and a device based on NB-IoT (NB-IoT), which are used for solving the problem that extra networking is needed for transmitting big data through NB-IoT, firstly, format conversion is carried out on data to be transmitted to generate a character string; secondly, fragmenting the character string according to the maximum transmission unit of the NB-IoT and a preset length to generate a plurality of fragment data; thirdly, determining the offset corresponding to the fragment data according to the position of the fragment data in the data to be transmitted aiming at each fragment data; and finally, sending the plurality of fragmented data carrying the offset to a receiving end through NB-IoT, so that the receiving end can recombine the plurality of fragmented data according to the offset carried in each fragmented data. By the method, the data files with large volumes can be divided into the data which can be directly transmitted by NB-IoT, so that extra networking is not needed when the large data is transmitted by the NB-IoT, and the cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating a NB-IoT based data transmission method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating another NB-IoT based data transmission method according to an embodiment of the present invention;
fig. 3 is a detailed flowchart of a NB-IoT based data transmission method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an NB-IoT-based data transmission apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another NB-IoT-based data transmission apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an NB-IoT-based data transmission apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another NB-IoT-based data transmission device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The Internet of things is a product which is extended and expanded on the basis of the Internet, any article is connected with the Internet through information sensing equipment, NB-IoT is one of the existing common Internet of things technologies, is constructed in a cellular network, has the characteristics of wide coverage, massive connection, low power consumption, low cost and the like, and has good application prospects in scenes such as intelligent monitoring, smart homes and the like.
Due to the characteristics of low power consumption and low network transmission rate of NB-IoT, efficient transmission can be realized for data with small sensor values and the like, but efficient transmission cannot be supported for files with large pictures and the like. If large files such as pictures need to be transmitted in an NB-IoT scene, another set of WIFI or 4G network is often required to be built, and the networking process is complex and high in cost.
Based on the above problems, embodiments of the present invention provide a data transmission method, device and apparatus based on NB-IoT, so as to solve the problem in the prior art that additional networking is required for transmitting larger data through NB-IoT.
The data transmission method provided by the exemplary embodiment of the present application is described below with reference to the accompanying drawings in conjunction with the application scenarios described above, and it should be noted that the application scenarios described above are only shown for the convenience of understanding the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect.
As shown in fig. 1, a schematic flow diagram of a data transmission method based on NB-IoT provided in an embodiment of the present invention is applied to a transmitting end, and the method includes:
101, converting the format of data to be transmitted to generate a character string;
102, fragmenting the character string according to the maximum transmission unit of the NB-IoT and a preset length to generate a plurality of fragment data;
103, determining an offset corresponding to the fragment data according to the position of the fragment data in the data to be transmitted for each fragment data;
and 104, sending the plurality of fragment data carrying the offset to a receiving end through the NB-IoT, so that the receiving end can recombine the plurality of fragment data according to the offset carried in each fragment data.
The invention discloses a data transmission method based on NB-IoT, firstly, format conversion is carried out on data to be transmitted to generate character strings; secondly, fragmenting the character string according to the maximum transmission unit of the NB-IoT and a preset length to generate a plurality of fragment data; thirdly, determining the offset corresponding to the fragment data according to the position of the fragment data in the data to be transmitted aiming at each fragment data; and finally, sending the plurality of fragmented data carrying the offset to a receiving end through NB-IoT, so that the receiving end can recombine the plurality of fragmented data according to the offset carried in each fragmented data. By the method, the data files with large volumes can be divided into the data which can be directly transmitted by NB-IoT, so that extra networking is not needed when the large data is transmitted by the NB-IoT, and the cost is reduced.
Accordingly, as shown in fig. 2, a flowchart of another NB-IoT-based data transmission method provided in the embodiment of the present invention is applied to a receiving end, and the method includes:
step 201, receiving a plurality of fragmented data sent by a sending end through NB-IoT;
step 202, according to the offset in each piece of fragment data, recombining a plurality of pieces of fragment data to generate data to be restored, wherein the offset is determined by a sending end according to the position of the piece of fragment data in the data to be transmitted;
and 203, converting the format of the data to be restored to generate target data.
The NB-IoT based data transmission method described above is explained in detail below:
as shown in fig. 3, a detailed flowchart of a NB-IoT based data transmission method according to an embodiment of the present invention is shown, where the method includes:
301, a sending end distributes an identifier for data to be transmitted;
specifically, the sender provides a globally unique or locally unique identifier, which is recorded as an ID, for each file to be transmitted.
Step 302, the sending end performs format conversion on data to be transmitted to generate a character string;
because the data format of NB-IoT transmission is hexadecimal character string, the data to be transmitted is converted into the hexadecimal character string format data by format conversion, and the length of the hexadecimal character string can be recorded as hexadecimal character string
Figure BDA0003443335640000081
Step 303, the sending end determines the data length of each piece of data
Figure BDA0003443335640000082
The character string is fragmented to generate a plurality of fragment data;
specifically, each piece of fragmented data may include a header and a data portion, where the header may include an identifier, a flag, and an offset, and optionally, the header may further include a header length, a total length, an identifier, a flag, and an offset, and two fields, i.e., the header length and the total length, may be optionally reserved or deleted according to actual needs.
Maximum transmission data length MTU and header length L according to maximum transmission unitheaderThe difference is obtained to obtain the maximum data length of the fragment data, and the NB-Io is used efficientlyT maximum transmission unit, making the data length of the first N-1 pieces of slicing data as the maximum data length, i.e.
Figure BDA0003443335640000083
Figure BDA0003443335640000084
According to hexadecimal character string length
Figure BDA0003443335640000085
The ratio of the maximum data length to the maximum data length is used for obtaining the number N of the fragment data, if the ratio is not an integer, the integer is added to 1, namely
Figure BDA0003443335640000086
The data length of the Nth fragment data is
Figure BDA0003443335640000087
Figure BDA0003443335640000088
For example, the total data length is 3000 bytes, the fragmentation data uses a fixed header, the header length is 20 bytes, and the maximum transmission data length of the maximum transmission unit is 512 bytes, so the maximum data length is 492 bytes, and it is necessary to divide the character string into 7 fragmentation data, where the data length of the first 6 fragmentation data is 492 bytes, and the data length of the last fragmentation data is 48 bytes.
Wherein the header length is the sum of the length of the identifier, the length of the flag, and the length of the offset, i.e., Lheader=LID+LFlag+LOffsetWherein L isIDIs the length of the identifier, LFlagIs the length of the mark, LOffsetFor the length of the offset, since the length of the identifier, the length of the flag, and the length of the offset are all preset and fixed lengths, the header length is also a preset and fixed length.
For example, the fragment data uses a fixed header, the header length is 20 bytes, the identifier length is 10 bytes, the flag length is 5 bytes, and the offset length is 5 bytes.
In addition, the total length is the sum of the header length and the data length of each piece of sliced data, i.e.
Figure BDA0003443335640000091
Figure BDA0003443335640000092
Wherein L isiIs the total length of the ith sliced data,
Figure BDA0003443335640000093
is the length of the data part in the ith piece of sliced data.
For example, the total length of data is 3000 bytes, the fragment data uses a fixed header, the header length is 20 bytes, the maximum transmission data length of the maximum transmission unit is 512 bytes, so the maximum data length is 492 bytes, the total length of each fragment data in the first 6 fragment data is 512 bytes, and the total length of the 7 th fragment data is 68 bytes.
Step 304, the sending end determines the mark of the fragment data according to the position of the fragment data in the character string;
in a specific implementation, the flag represents the position of the fragment data in the character string, for example, the character string is divided into 7 pieces of fragment data, the flag of the fragment data is 1, which represents that the fragment data is the data arranged the first in the character string and is denoted as the first fragment, similarly, the flag of the fragment data is 7, which represents that the fragment data is the data arranged the last in the character string and is denoted as the seventh fragment, and the flag of the fragment data is 2, which represents that the fragment data is the data arranged after the first fragment and before the seventh fragment in the character string. Specifically, the sending end may send the correspondence between the number of the fragmented data and the identifier of the fragmented data to the receiving end, and the receiving end determines whether the group of data has been transmitted according to the correspondence and the flag in the received fragmented data.
For example, the identifier of the data to be transmitted is a, the number of fragments is 7, the sending end sends the corresponding relation between a and 7 to the receiving end, when the receiving end receives the fragment data, the receiving end determines that the fragment data with the identifier of a and the identifier of 7 is received, and determines that the transmission of the group of fragment data is completed; it may also be determined that the group of fragmented data transmission is complete by determining that fragmented data with identifier a and flags 1 and 7, respectively, is received.
That is, the determination that the group of fragmented data transmission is complete may be made based on whether the last piece of data is received, or may be made based on whether the first piece of data and the last piece of data are received.
In an embodiment, the flag may be further represented by a start, a number, and an end, where the start represents the first sliced data, the end represents the last sliced data, and the number represents the sliced data in the middle of the first sliced data and the last sliced data, respectively.
305, determining the offset corresponding to the fragment data according to the position of the fragment data in the character string by the sending end aiming at each fragment data;
specifically, the offset is used to indicate an arrangement order among the sliced data, and may be a number of bytes of a data portion in the sliced data that is relatively offset with respect to the beginning of a hexadecimal character string, where the length of the sliced data is used as a unit offset; and determining the offset according to the mark and the unit offset of the fragment data.
For example, if there are 7 pieces of slice data, and the data length of the slice data is 492 bytes, the unit offset is 492 bytes, the offset is 0 × 492 bytes for the slice data marked with 1, the offset is 1 × 492 bytes for the slice data marked with 2, and the offset is 2 × 492 bytes … … for the slice data marked with 3, the offset is 6 × 492 bytes for the slice data marked with 7;
in addition, the offset may also be a logical number (e.g. 1,2,3, etc.) of the fragment data in all fragments, the specific form of the offset is not limited but is not repeatable, and it is required that the header flag of the fragment data with the smallest offset is the first fragment, and the header flag of the fragment data with the largest offset is the last fragment, and according to the logical order of the fragment data in the character string, the corresponding offset is defined.
And step 306, the sending end encapsulates the fragment data and the corresponding header.
And 307, the sending end sends the encapsulated multiple pieces of fragmented data to the receiving end through the NB-IoT.
And step 308, the receiving end receives and stores the fragment data sent by the sending end.
Step 309, the receiving end determines that the transmission of the fragmented data with the same identifier is completed according to the identifier and the mark in each fragmented data;
in a specific implementation, the receiving end may scan stored fragmented data, group fragmented data with the same identifier ID in the header, and if there is a mark arranged in the character string at the top and a mark arranged in the character string at the last in the mark field of the header of the group of data at the same time, determine that transmission of fragmented data with the same identifier is completed, for example, referring to the example of step 304, the receiving end determines that the identifier included in the received fragmented data is a and the mark is 7 fragmented data, and determines that transmission of fragmented data with the identifier a is completed; it may also be determined that the received fragmented data includes fragmented data with identifier a and flags 1 and 7, respectively, and it is determined that the transmission of fragmented data with identifier a is completed.
In another embodiment, the receiving end determines that the transmission of the group of fragment data is completed when the receiving end determines that the fragment data with the same identifier, which includes the fragment data marked as end, is received; it may also be determined that the received fragmented data of the same identifier includes fragmented data marked as start and end, and it is determined that the transmission of the set of fragmented data is completed.
Step 310, a receiving end determines the arrangement sequence of a plurality of fragment data with the same identifier according to the offset in each fragment data aiming at each fragment data with the same identifier, and deletes the identifier, the mark and the offset in each fragment data to obtain a plurality of target fragment data;
specifically, the same group of fragment data is sequenced according to the offset field in the header, the fragment data containing the first mark arranged in the character string is required to be arranged at the top, the fragment data containing the last mark arranged in the character string is required to be arranged at the last, and if the fragment data is arranged to be non-repeated or non-missing according to the offset, the group of fragment data is determined to meet the reassembly requirement.
For example, the tile data in the example of step 305 is arranged according to the offset, the tile data with the offset of 60 is arranged at the first bit, the tile data with the offset of 120 is arranged at the second bit, and so on, the tile data with the offset of 420 is arranged at the seventh bit, and if the arranged tile data is not repeated and is not missing, it is determined that the set of tile data meets the reassembly requirement.
And 311, the receiving end recombines the target fragment data according to the arrangement sequence to generate data to be restored.
Specifically, according to the arrangement sequence determined in step 311, the target fragment data is spliced and recombined to generate the hexadecimal character string to be restored.
In step 312, the receiving end performs format conversion on the data to be restored to generate target data.
Specifically, the hexadecimal character string to be restored is converted to restore the target data.
In the embodiment of the invention, a sending end fragments data, encapsulates offset in each fragment data, and sends each fragment data to a receiving end through NB-IOT, after receiving the fragment data, the receiving end recombines the fragment data according to the offset to obtain data to be restored, and performs format conversion on the data to be restored to obtain target data, thereby realizing the scheme of transmitting larger data through NB-IOT, needing no extra networking and reducing transmission cost.
Based on the same inventive concept, the embodiment of the present invention further provides an NB-IoT-based data transmission apparatus, which is applied to a transmitting end, and the implementation of the apparatus may refer to the implementation of the NB-IoT-based data transmission method, and repeated details are not repeated.
As shown in fig. 4, a schematic structural diagram of an NB-IoT based data transmission apparatus provided in an embodiment of the present invention includes:
a first conversion module 401, configured to perform format conversion on data to be transmitted to generate a character string;
the fragmentation module 402 is configured to fragment the character string according to a preset fragmentation strategy to generate a plurality of fragmentation data;
a sending module 403, configured to send the fragmented data to the receiving end based on NB-IoT, so that the receiving end reassembles the multiple fragmented data.
Optionally, the apparatus further includes an allocation module, configured to, before format conversion is performed on the data to be transmitted and a character string is generated, allocate an identifier to the data to be transmitted.
Optionally, the preset length includes a length of the identifier, a length of the mark, and a length of the offset;
the fragmentation module 402 is specifically configured to:
taking the difference value between the maximum transmission unit of NB-IoT and the length of the identifier, the length of the mark and the length of the offset as the length of the fragment data;
and based on the length of the fragment data, fragmenting the character string to generate a plurality of fragment data.
Optionally, the apparatus further comprises:
the identifier determining module is used for taking the identifier of the data to be transmitted corresponding to the fragment data as the identifier of the fragment data aiming at each fragment data;
the mark determining module is used for determining the mark of the fragment data according to the position of the fragment data in the character string;
the encapsulation module is used for encapsulating the identifier, the mark, the offset and the fragment data to obtain encapsulated data;
the sending module 403 is specifically configured to:
sending the encapsulated data to the receiving end based on the NB-IoT.
Optionally, the slicing module 402 is further configured to:
taking the length of the fragment data as a unit offset;
and determining the offset according to the mark and the unit offset of the fragment data.
Based on the same inventive concept, the embodiment of the present invention further provides an NB-IoT-based data transmission apparatus, which is applied to a receiving end, and the implementation of the apparatus may refer to the implementation of the NB-IoT-based data transmission method, and repeated details are not repeated.
As shown in fig. 5, a schematic structural diagram of another NB-IoT based data transmission apparatus provided in an embodiment of the present invention includes:
a receiving module 501, configured to receive multiple fragmented data sent by a sending end based on NB-IoT;
the restructuring module 502 is configured to restructure the multiple fragmented data according to a preset restructuring strategy to generate data to be restored;
the second converting module 503 is configured to perform format conversion on the data to be restored.
Optionally, the restructuring module 502 is specifically configured to:
according to the identifier and the mark in each piece of fragmented data, the completion of the transmission of the fragmented data with the same identifier is determined;
for each piece data of the same identifier, determining the arrangement sequence of a plurality of piece data of the same identifier according to the offset in each piece data, and deleting the identifier, the mark and the offset in each piece data to obtain a plurality of target piece data;
and recombining the target fragment data according to the arrangement sequence to generate the data to be restored.
Based on the same inventive concept, the embodiment of the present application further provides an NB-IoT-based data transmission device, which can be applied to a sending end. The implementation of the device may refer to the implementation of the NB-IoT based data transmission method, and repeated descriptions are omitted here.
As shown in fig. 6, a schematic structural diagram of an NB-IoT based data transmission device according to an embodiment of the present invention includes a processor 601, a memory 602, and a communication interface 603, where when the processor 601 executes a program, any of the methods applied to the transmitting end can be implemented.
A memory 602 for storing computer programs executed by the processor 601. The memory 602 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, a program required for running an instant messaging function, and the like; the storage data area can store various instant messaging information, operation instruction sets and the like.
The memory 602 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 602 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or any other medium which can be used to carry or store desired program code in the form of instructions or data structures and which can be accessed by a computer. The memory 602 may be a combination of the above.
The processor 601 may include one or more Central Processing Units (CPUs), or be a digital Processing Unit, etc. A processor 601, configured to implement any of the NB-IoT based data transmission methods described above when invoking a computer program stored in the memory 602.
The communication interface 603 is used for communication with a terminal device and other servers.
The embodiment of the present application does not limit the specific connection medium among the memory 602, the communication interface 603, and the processor 601. In the embodiment of the present application, the memory 602 and the processor 601 are connected by the bus 604 in fig. 6, the bus 604 is represented by a thick line in fig. 6, and the connection manner between other components is merely illustrative and is not limited thereto. The bus 604 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
Specifically, the processor 601, when calling the computer program stored in the memory 602, executes the following procedures according to the obtained program:
carrying out format conversion on data to be transmitted to generate a character string;
fragmenting the character string according to the maximum transmission unit of the NB-IoT and a preset length to generate a plurality of fragment data;
for each piece of fragment data, determining the offset corresponding to the piece of fragment data according to the position of the piece of fragment data in the data to be transmitted;
and sending the plurality of fragment data carrying the offset to a receiving end through the NB-IoT so that the receiving end can recombine the plurality of fragment data according to the offset carried in each fragment data.
In an alternative embodiment, the processor 601 is specifically configured to:
and allocating an identifier for the data to be transmitted.
In an alternative embodiment, the processor 601 is specifically configured to:
taking the difference between the maximum transmission unit of the NB-IoT and the length of the identifier, the length of the mark and the length of the offset as the length of the fragmented data;
and based on the length of the fragment data, fragmenting the character string to generate a plurality of fragment data.
In an optional embodiment, after fragmenting the character string according to the maximum transmission unit of NB-IoT and a preset length to generate a plurality of fragment data, and before sending the fragment data to the receiving end based on NB-IoT, the processor 601 is specifically configured to:
for each piece of fragment data, taking an identifier of data to be transmitted corresponding to the piece of fragment data as an identifier of the piece of fragment data;
determining the mark of the fragment data according to the position of the fragment data in the character string;
packaging the identifier, the mark, the offset and the fragment data to obtain packaged data;
and sending the encapsulated data to a receiving end based on NB-IoT.
In an alternative embodiment, the processor 601 is specifically configured to:
taking the length of the fragment data as a unit offset;
and determining the offset according to the mark and the unit offset of the fragment data.
Based on the same inventive concept, the embodiment of the present application further provides an NB-IoT-based data transmission device, which can be applied to a receiving end. The implementation of the device may refer to the implementation of the NB-IoT-based data transmission method and the implementation of the sender data transmission device, and repeated descriptions are omitted here.
As shown in fig. 7, another NB-IoT-based data transmission apparatus according to an embodiment of the present invention is applied to a receiving end, and includes a processor 701, a memory 702, and a communication interface 703, where when the processor 701 executes a program, any of the methods applied to the receiving end can be implemented.
A memory 702 for storing computer programs executed by the processor 701. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a program required for running an instant messaging function, and the like; the storage data area can store various instant messaging information, operation instruction sets and the like.
The memory 702 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 702 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or any other medium which can be used to carry or store desired program code in the form of instructions or data structures and which can be accessed by a computer. Memory 702 may be a combination of the above.
The processor 701 may include one or more Central Processing Units (CPUs), or be a digital Processing Unit, etc. A processor 701 configured to implement any of the NB-IoT based data transmission methods described above when invoking the computer program stored in the memory 702.
The communication interface 703 is used for communicating with terminal devices and other servers.
In the embodiment of the present application, the specific connection medium between the memory 702, the communication interface 703 and the processor 701 is not limited. In the embodiment of the present application, the memory 702 and the processor 701 are connected by a bus 704 in fig. 7, the bus 704 is represented by a thick line in fig. 7, and the connection manner between other components is merely illustrative and is not limited. The bus 704 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
Specifically, the processor 701 is configured to, when calling the computer program stored in the memory 702, execute, according to the obtained program:
receiving a plurality of fragmented data sent by a sending end through NB-IoT;
according to the offset in each piece of fragment data, recombining the plurality of piece of fragment data to generate data to be restored, wherein the offset is determined by a sending end according to the position of the piece of fragment data in the data to be transmitted;
and carrying out format conversion on the data to be restored to generate target data.
In an alternative embodiment, the processor 701 is specifically configured to:
according to the identifier and the mark in each piece of fragmented data, the completion of the transmission of the fragmented data with the same identifier is determined;
aiming at each piece data of the same identifier, determining the arrangement sequence of a plurality of piece data of the same identifier according to the offset in each piece data, and deleting the identifier, the mark and the offset in each piece data to obtain a plurality of target piece data;
and recombining the target fragment data according to the arrangement sequence to generate the data to be restored.
Based on the same inventive concept, the embodiment of the application provides a computer-readable storage medium.
Optionally, the computer-readable storage medium has a computer program comprising program instructions that, when executed by a computer, cause the computer to perform the steps of the NB-IoT based data transmission method described above. Since the computer program in the present embodiment and the NB-IoT based data transmission method are based on the same idea, and the implementation process of the computer program in the present embodiment can be clearly understood by those skilled in the art through the detailed description of the foregoing method, the detailed description is omitted here for the brevity of the description.
Based on the same inventive concept, the embodiment of the present application provides a computer program product. Optionally, the computer program product stores a computer program comprising program instructions that, when executed by a computer, cause the computer to perform the steps of the NB-IoT based data transmission method described above. Since the computer program in the present embodiment and the NB-IoT based data transmission method are based on the same idea, and the implementation process of the computer program in the present embodiment can be clearly understood by those skilled in the art through the detailed description of the foregoing method, the detailed description is omitted here for the brevity of the description.
The invention discloses a data transmission method, equipment and a device based on NB-IoT, which are used for solving the problem that extra networking is needed for transmitting big data through NB-IoT, and the method comprises the following steps: distributing identifiers for data to be transmitted at a transmitting end; carrying out format conversion on data to be transmitted to generate a character string; determining the data length of each piece of fragment data, and fragmenting the character string to generate a plurality of pieces of fragment data; determining the mark of the fragment data according to the position of the fragment data in the character string; determining the offset corresponding to the fragment data according to the position of the fragment data in the character string aiming at each fragment data; packaging the fragment data and the corresponding header; transmitting the encapsulated plurality of sliced data to a receiving end through NB-IoT; receiving and storing the fragment data sent by the sending end; according to the identifier and the mark in each piece of fragmented data, the completion of the transmission of the fragmented data with the same identifier is determined; aiming at each piece data of the same identifier, determining the arrangement sequence of a plurality of piece data of the same identifier according to the offset in each piece data, and deleting the identifier, the mark and the offset in each piece data to obtain a plurality of target piece data; the data transmission method comprises the steps of setting up a data transmission protocol between a sending end fragment and a receiving end recombination, transmitting file data with large volume after the file data is fragmented, and restoring the fragmented file data by the receiving end through a recombination method. Compared with the prior art that a set of WIFI or 4G network is required to be established to transmit large files alone under the intelligent monitoring and other scenes based on the NB-IoT network, the method and the device have the advantages that the transmission of the large files such as pictures is realized by utilizing the original NB-IoT network, the problem of additional networking is avoided, and the problems of cost increase, networking complexity and the like are solved.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the application. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (11)

1. A data transmission method based on a narrow-band Internet of things (NB-IoT) is applied to a sending end, and is characterized by comprising the following steps:
carrying out format conversion on data to be transmitted to generate a character string;
fragmenting the character string according to the maximum transmission unit of the NB-IoT and a preset length to generate a plurality of fragment data;
for each piece of fragment data, determining the offset corresponding to the piece of fragment data according to the position of the piece of fragment data in the data to be transmitted;
and sending the plurality of fragment data carrying the offset to a receiving end through the NB-IoT so that the receiving end can recombine the plurality of fragment data according to the offset carried in each fragment data.
2. The method of claim 1, wherein before converting the format of the data to be transmitted to generate the string, the method further comprises:
and allocating an identifier for the data to be transmitted.
3. The method of claim 2, wherein the preset length comprises a length of the identifier, a length of a flag, and a length of the offset;
the fragmenting the character string according to the maximum transmission unit of the NB-IoT and a preset length to generate a plurality of fragment data, including:
taking the difference between the maximum transmission unit of the NB-IoT and the length of the identifier, the length of the mark and the length of the offset as the length of the fragmented data;
and based on the length of the fragment data, fragmenting the character string to generate a plurality of fragment data.
4. The method of claim 3, wherein after the fragmenting the string according to the maximum transmission unit of the NB-IoT and a preset length to generate a plurality of fragmented data and before the NB-IoT-based transmitting fragmented data to a receiving end, the method further comprises:
for each piece of fragment data, taking an identifier of data to be transmitted corresponding to the piece of fragment data as an identifier of the piece of fragment data;
determining the mark of the fragment data according to the position of the fragment data in the character string;
packaging the identifier, the mark, the offset and the fragment data to obtain packaged data;
the transmitting the fragmented data to the receiving end based on the NB-IoT comprises the following steps:
sending the encapsulated data to the receiving end based on the NB-IoT.
5. The method according to any one of claims 1 to 4, wherein the determining, for each piece of sliced data, an offset corresponding to the piece of sliced data according to the position of the piece of sliced data in the character string includes:
taking the length of the slicing data as a unit offset;
and determining the offset according to the mark of the fragment data and the unit offset.
6. An NB-IoT-based data transmission method applied to a receiving end, the method comprising:
receiving a plurality of fragmented data sent by a sending end through the NB-IoT;
recombining the fragment data according to the offset in each fragment data to generate data to be restored, wherein the offset is determined by the sending end according to the position of the fragment data in the data to be transmitted;
and carrying out format conversion on the data to be restored to generate target data.
7. The method of claim 6, wherein the reconstructing the plurality of sliced data according to a preset reconstruction policy to generate data to be restored comprises:
according to the identifier and the mark in each piece of fragmented data, the completion of the transmission of the fragmented data with the same identifier is determined;
for each piece data of the same identifier, determining the arrangement sequence of a plurality of piece data of the same identifier according to the offset in each piece data, and deleting the identifier, the mark and the offset in each piece data to obtain a plurality of target piece data;
and recombining the target fragment data according to the arrangement sequence to generate the data to be restored.
8. An NB-IoT based data transmission device applied to a transmitting end, comprising a processor, a memory, and a program stored on the memory and capable of running on the processor, wherein the processor, when executing the program, is capable of implementing the method according to any one of claims 1 to 5.
9. An NB-IoT based data transmission device, applied to a receiving end, comprising a processor, a memory, and a program stored on the memory and capable of running on the processor, wherein the processor, when executing the program, is capable of implementing the method according to claim 6 or 7.
10. An NB-IoT based data transmission device applied to a transmitting end comprises the following steps:
the first conversion module is used for carrying out format conversion on data to be transmitted to generate a character string;
the fragmentation module is used for fragmenting the character string according to a preset fragmentation strategy to generate a plurality of fragmentation data;
the sending module is used for sending the fragmented data to a receiving end based on NB-IoT so that the receiving end can recombine a plurality of fragmented data.
11. An NB-IoT based data transmission device applied to a transmitting end comprises the following steps:
the receiving module is used for receiving a plurality of fragmented data sent by the sending end based on NB-IoT;
the recombination module is used for recombining the fragment data according to a preset recombination strategy to generate data to be restored;
and the second conversion module is used for carrying out format conversion on the data to be restored.
CN202111640782.1A 2021-12-29 2021-12-29 Data transmission method, equipment and device based on NB-IoT Pending CN114390096A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111640782.1A CN114390096A (en) 2021-12-29 2021-12-29 Data transmission method, equipment and device based on NB-IoT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111640782.1A CN114390096A (en) 2021-12-29 2021-12-29 Data transmission method, equipment and device based on NB-IoT

Publications (1)

Publication Number Publication Date
CN114390096A true CN114390096A (en) 2022-04-22

Family

ID=81198962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111640782.1A Pending CN114390096A (en) 2021-12-29 2021-12-29 Data transmission method, equipment and device based on NB-IoT

Country Status (1)

Country Link
CN (1) CN114390096A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109327552A (en) * 2018-12-05 2019-02-12 重庆邮电大学 A kind of wisdom street lamp data transfer management method based on NB-IoT
US20200084300A1 (en) * 2018-09-07 2020-03-12 Nokia Solutions And Networks Oy Packet fragmentation control
CN111917786A (en) * 2020-08-06 2020-11-10 冯田旺 GRE tunnel-based data packet fragmentation method and data packet recombination method
CN112671771A (en) * 2020-12-24 2021-04-16 上海银基信息安全技术股份有限公司 Data transmission method, device, electronic equipment and medium
CN112714070A (en) * 2019-10-24 2021-04-27 北京华为数字技术有限公司 Communication method, device, system and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200084300A1 (en) * 2018-09-07 2020-03-12 Nokia Solutions And Networks Oy Packet fragmentation control
CN109327552A (en) * 2018-12-05 2019-02-12 重庆邮电大学 A kind of wisdom street lamp data transfer management method based on NB-IoT
CN112714070A (en) * 2019-10-24 2021-04-27 北京华为数字技术有限公司 Communication method, device, system and storage medium
CN111917786A (en) * 2020-08-06 2020-11-10 冯田旺 GRE tunnel-based data packet fragmentation method and data packet recombination method
CN112671771A (en) * 2020-12-24 2021-04-16 上海银基信息安全技术股份有限公司 Data transmission method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
US11275530B2 (en) Method, system, and related device for NAS data access
CN101828372B (en) Parallelizing the TCP behavior of a network connection
CN109756536A (en) A kind of method, apparatus and system of data transmission
US11405458B2 (en) Sending and receiving data using multiple objects with a single storage request
CN104199951B (en) Web page processing method and device
US10817460B2 (en) RDMA data sending and receiving methods, electronic device, and readable storage medium
CN106170968B (en) A kind of data compression storage method, device and distributed file system
CN101197773B (en) Packet compressed transmitting and received de-compression method and system based on multilink
CN110928483A (en) Data storage method, data acquisition method and equipment
TW201233107A (en) Grouping small burst transmissions for downlink machine-to-machine communications
CN108632326B (en) Method and device for transmitting data by protocol data unit
CN104717257A (en) Method and device for transmitting data messages
CN114390096A (en) Data transmission method, equipment and device based on NB-IoT
CN104081747B (en) Transmit method, the encoding apparatus and decoding apparatus of HTTP message
WO2021036189A1 (en) Rdma data sending and receiving methods, electronic device and readable storage medium
CN109067922A (en) A kind of data transmission method and device
CN112422525B (en) Fault data transmission method, device, equipment and storage medium
CN109996288B (en) Data cascading method and device of RLC layer, computer equipment and storage medium
CN100589448C (en) Method for realizing data package compression/decompression
CN103906007A (en) Multimedia-message forwarding method and device
CN111865884B (en) Message processing method, device and equipment
CN109462591B (en) Data transmission method, receiving method, device and system
CN111478802A (en) Distribution network processing method and device, computer equipment and storage medium
CN110557374A (en) Power data acquisition method and device, computer equipment and storage medium
CN108990106A (en) A kind of data transmission method and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination