CN108900433B - Method, terminal and server for transmitting lora message - Google Patents

Method, terminal and server for transmitting lora message Download PDF

Info

Publication number
CN108900433B
CN108900433B CN201810516033.XA CN201810516033A CN108900433B CN 108900433 B CN108900433 B CN 108900433B CN 201810516033 A CN201810516033 A CN 201810516033A CN 108900433 B CN108900433 B CN 108900433B
Authority
CN
China
Prior art keywords
lora
message
fragment
terminal
fragmentation
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.)
Active
Application number
CN201810516033.XA
Other languages
Chinese (zh)
Other versions
CN108900433A (en
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.)
Beijing Star Net Ruijie Networks Co Ltd
Original Assignee
Beijing Star Net Ruijie Networks Co 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 Beijing Star Net Ruijie Networks Co Ltd filed Critical Beijing Star Net Ruijie Networks Co Ltd
Priority to CN201810516033.XA priority Critical patent/CN108900433B/en
Publication of CN108900433A publication Critical patent/CN108900433A/en
Application granted granted Critical
Publication of CN108900433B publication Critical patent/CN108900433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0078Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
    • H04L1/0083Formatting with frames or packets; Protocol or part of protocol for error control

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a method, a terminal and a server for transmitting a lora message, which comprises the following steps: receiving a downlink service data message sent to a first terminal by an application server; when the length of the downlink service data message exceeds the maximum message length supported by the first current rate of the first terminal, sending a lora message fragmentation request for performing lora fragmentation transmission on the downlink service data message to the first terminal; receiving a lora message fragment response sent by the first terminal when the first terminal determines that the lora message fragment is supported according to the lora message fragment request; and performing lora fragmentation on the downlink service data message, determining the size of the lora fragmentation message sent each time according to the message sending rate when the lora fragmentation message is sent each time, and sending each lora fragmentation message to the first terminal so that the first terminal can obtain the recombined downlink service data message according to all the received lora fragmentation messages. Longer message transmission may be supported.

Description

Method, terminal and server for transmitting lora message
Technical Field
The invention relates to the field of data communication, in particular to a method, a terminal and a server for transmitting a lora message.
Background
Lora (long range) is a kind of low-power consumption wide area internet of things (LPWAN), and the Lora network deployment mainly comprises terminal, gateway, Loraserver, and high in the clouds jointly, can realize the two-way transmission of application data. The communication mode between the cloud and the loraerver server can support multiple protocols, including MQTT (Message queue Telemetry Transport), HTTP (HyperText Transfer Protocol), and the like, and the length of application data is also different according to different requirements of services, for example, the TCP Protocol, and the length of a Message sent from the application server to the loraerver server may be 1500 bytes at most. Whereas Lora communication can carry 250 bits at most at a time when using rate level 0, which is the lowest rate most widely covered. Using the lora code bandwidth 125Khz, at the highest rate level 5, 11000 bits can be carried at a time.
With the wide application of the Lora technology in various application environments, the requirements for uplink and downlink services are gradually complicated, long-distance Lora terminals have to use the low-speed DR0 for transmission due to environmental restrictions, and when the number of bytes required for a service packet exceeds 250 bits, if the existing IP fragmentation technology is used, not only a large number of bytes need to be used at the head, but also the Lora terminals are generally simple and low-cost singlechips, and cannot well support the existing IP protocol complicated fragmentation technology.
The existing scheme is that an application server end uses an existing protocol (such as an IP protocol) to fragment, and simultaneously a terminal is required to support the protocol, and can fragment and recombine a message with a length exceeding the length. However, since the method is not a Lora protocol standard, the implementation of the terminals is different, and different services are incompatible, and each application server needs to perform a unique fragment size design for Lora transmission according to Lora capability, and even needs to consider the change of the fragment size at different rates adopted by the current Lora terminal, which not only increases the complexity of the application server, but also increases the coupling between Lora and service codes. Obviously, it is not suitable.
Disclosure of Invention
In order to solve the technical problem, the embodiment of the invention adopts the following technical scheme:
a method for transmitting a lora message comprises the following steps:
receiving a downlink service data message sent to a first terminal by an application server;
when an uplink message sent by the first terminal is received, determining a downlink service data message corresponding to the terminal identifier according to the terminal identifier in the uplink message;
when the length of the downlink service data message exceeds the maximum message length supported by the first current rate of the first terminal, sending a lora message fragmentation request for performing lora fragmentation transmission on the downlink service data message to the first terminal;
receiving a lora message fragment response sent by the first terminal when the first terminal determines that the lora message fragment is supported according to the lora message fragment request;
performing lora fragmentation on the downlink service data message, determining a message sending rate when the lora fragmentation message is sent each time, determining the size of the lora fragmentation message sent each time according to the message sending rate, and sending each lora fragmentation message to the first terminal, so that the first terminal can obtain the recombined downlink service data message according to all the received lora fragmentation messages.
Optionally, the lora message fragmentation request includes a fragmentation identifier, and the step of receiving the lora message fragmentation response sent by the first terminal when determining that the lora message fragmentation is supported according to the lora message fragmentation request specifically includes:
and receiving a lora message fragment response sent by the first terminal according to the lora message fragment request when the fragment identifier is identified.
Optionally, when sending the lora fragment packet each time, determining a packet sending rate, determining the size of the lora fragment packet sent each time according to the packet sending rate, and sending each lora fragment packet to the first terminal, so that the step of obtaining the reassembled downlink service data packet by the first terminal according to all the received lora fragment packets specifically includes:
and when the lora fragment message is sent each time, acquiring a second current rate of the first terminal according to the lora fragment response, determining the size of the lora fragment message sent each time according to the second current rate, and sending each lora fragment message to the first terminal so that the first terminal can obtain a recombined downlink service data message according to all the received lora fragment messages.
Optionally, when sending the lora fragment packet each time, determining a packet sending rate, determining the size of the lora fragment packet sent each time according to the packet sending rate, and sending each lora fragment packet to the first terminal, so that the step of obtaining the reassembled downlink service data packet by the first terminal according to all the received lora fragment packets specifically includes:
determining the message sending rate when sending the lora fragment messages each time, determining the size of the lora fragment messages sent each time according to the message sending rate, setting the sequence number of the lora fragment messages sent each time according to the sequence from small to large, setting a termination flag bit in the last lora fragment message, sending the lora fragment messages corresponding to the first message sequence number to the first terminal according to the first message sequence number fed back by the first terminal when receiving the lora fragment messages, and sending the lora fragment messages containing the termination flag bit to the first terminal, so that the first terminal stops feeding back the first message sequence number according to the termination flag bit and obtains recombined downlink service data messages according to all the received lora fragment messages.
Optionally, the lora packet fragmentation request includes the first length of the downlink service data packet, and the step of sending each lora fragment packet to the first terminal so that the first terminal obtains the reassembled downlink service data packet according to all received lora fragment packets specifically includes:
and sending each lora fragment message to the first terminal so that the first terminal can check the second length of the recombined downlink service data message according to the first length of the downlink service data message after obtaining the recombined downlink service data message according to all the received lora fragment messages.
Another aspect of the embodiments of the present invention is to provide a method for transmitting a lora packet, which is applied to a lora terminal, and includes:
receiving a lora message fragmentation request that a lora network server performs lora fragmentation transmission on a downlink service data message stored by the lora network server, wherein the lora message fragmentation request is sent when the lora network server receives a downlink service data message sent to a lora terminal by an application server and receives an uplink message sent by the lora terminal, the lora message fragmentation request is sent after the length of the downlink service data message exceeds the maximum message length supported by a first current rate of the lora terminal, and the downlink service data message corresponding to the terminal identifier is determined according to the terminal identifier in the uplink message;
when the support of the lora message fragments is determined according to the lora message fragment request, a lora message fragment response is sent to the lora network server;
receiving a lora fragment message sent by the lora network server, wherein the size of the lora fragment message is determined according to a message sending rate when the lora network server sends the lora fragment message each time after starting to perform lora fragmentation on a downlink service data message;
and acquiring a recombined downlink service data message according to all the received lora fragment messages.
Optionally, the lora message fragmentation request includes a fragmentation identifier, and the step of sending the lora message fragmentation response to the lora network server when it is determined that the lora message fragmentation is supported according to the lora message fragmentation request specifically includes:
and when the fragment identification is identified according to the lora message fragment request, sending a lora message fragment response to the lora network server.
Optionally, the receiving the lora fragment sent by the lora network server, where the size of the lora fragment packet is determined according to a packet sending rate when the lora network server starts to perform lora fragment on a downlink service data packet and sends the lora fragment packet each time, specifically includes:
and receiving a lora fragment message sent by the lora network server, wherein the size of the lora fragment message is determined according to a second current rate of the lora terminal obtained according to the response of the lora message fragment when the lora network server starts to perform lora fragmentation on a downlink service data message each time the lora fragment message is sent.
Optionally, the step of receiving the lora fragment packet sent by the lora network server specifically includes:
receiving the lora fragment messages sent by the lora network server, wherein the lora fragment messages are provided with serial numbers which are set by the lora network server for the lora fragment messages sent each time according to the sequence from small to large, and the last lora fragment message is provided with a termination flag bit;
the step of obtaining the recombined downlink service data message according to all the received lora fragmentation messages specifically comprises the following steps:
and when the lora fragmented messages containing the termination zone bits are received, acquiring the recombined downlink service data messages according to all the received lora fragmented messages.
Optionally, the step of receiving the lora fragment packet sent by the lora network server specifically includes:
when receiving the previous lora slicing message sent by the lora network server, feeding back the first message serial number to the lora network server,
and receiving the current lora slicing message which is sent by the lora network server and corresponds to the first message serial number.
Optionally, the lora packet fragmentation request includes the first length of the downlink service data packet,
the step of obtaining the recombined downlink service data message according to all the received lora slicing messages specifically includes:
and after obtaining the recombined downlink service data message according to all the received lora fragment messages, checking the second length of the recombined downlink service data message according to the first length of the downlink service data message.
In another aspect of the embodiments of the present invention, a server for transmitting a lora packet is provided, including:
the first receiving module is used for receiving a downlink service data message sent to the first terminal by the application server;
a determining module, configured to determine, when an uplink packet sent by the first terminal is received, a downlink service data packet corresponding to a terminal identifier according to the terminal identifier in the uplink packet;
a first sending module, configured to send, to the first terminal, a lora packet fragmentation request for performing lora fragmentation transmission on the downlink service data packet when the length of the downlink service data packet exceeds a maximum packet length supported by a first current rate of the first terminal;
the second receiving module is used for receiving a lora message fragment response sent by the first terminal when the first terminal determines that the lora message fragment is supported according to the lora message fragment request;
the fragmentation module is used for carrying out lora fragmentation on the downlink service data message, determining the message sending rate when the lora fragmentation message is sent each time, and determining the size of the lora fragmentation message sent each time according to the message sending rate;
and the second sending module is used for sending each lora fragment message to the first terminal so that the first terminal can obtain the recombined downlink service data message according to all the received lora fragment messages.
Optionally, the lora message fragmentation request includes a fragmentation identifier, and the second receiving module is specifically configured to:
and receiving a response of the lora message fragment sent by the first terminal when determining that the lora message fragment is supported according to the lora message fragment request.
Optionally, the fragmentation module is specifically configured to perform lora fragmentation on the downlink service data packet, obtain a second current rate of the first terminal according to the lora packet fragmentation response when the lora fragmentation packet is sent each time, and determine the size of the lora fragmentation packet sent each time according to the second current rate.
Optionally, the fragmentation module is specifically configured to perform lora fragmentation on the downlink service data packet, determine a packet sending rate when sending the lora fragmentation packet each time, determine the size of the lora fragmentation packet sent each time according to the packet sending rate, set the sequence number of the lora fragmentation packet sent each time according to the sequence from small to large, set the termination flag bit in the last lora fragmentation packet,
the second sending module is specifically configured to send the lora fragment packet corresponding to the first packet sequence number to the first terminal according to the first packet sequence number fed back by the first terminal when receiving the lora fragment packet, and send the lora fragment packet including the termination flag to the first terminal, so that the first terminal stops feeding back the first packet sequence number according to the termination flag and obtains a reassembled downlink service data packet according to all the received lora fragment packets.
Optionally, the lora packet fragmentation request includes the first length of the downlink service data packet,
the second sending module is specifically configured to send each lora fragment packet to the first terminal, so that the first terminal obtains a reassembled downlink service data packet according to all the received lora fragment packets, and then checks a second length of the reassembled downlink service data packet according to the first length of the downlink service data packet.
A final aspect of the embodiments of the present invention is to provide a terminal for transmitting a lora packet, including:
a third receiving module, configured to receive a lora packet fragmentation request that a lora network server performs lora fragmentation transmission on a downlink service data packet stored in the lora network server, where the lora packet fragmentation request is sent by the lora network server when receiving a downlink service data packet sent by an application server to the lora terminal and receiving an uplink packet sent by the lora terminal, and determines, according to a terminal identifier in the uplink packet, the downlink service data packet corresponding to the terminal identifier, and sends the downlink service data packet after the length of the downlink service data packet exceeds the maximum packet length supported by the first current rate of the lora terminal;
the sending module is used for sending a lora message fragment response to the lora network server when the lora message fragment supporting request is determined according to the lora message fragment request;
a fourth receiving module, configured to receive a lora fragment packet sent by the lora network server, where the size of the lora fragment packet is determined according to a packet sending rate when the lora network server starts to perform lora fragmentation on a downlink service data packet and sends the lora fragment packet each time;
and the restructuring module is used for obtaining the restructured downlink service data message according to all the received lora fragment messages.
Optionally, the lora message fragmentation request includes a fragmentation identifier, and the sending module is specifically configured to:
and when the fragment identification is identified according to the lora message fragment request, sending a lora message fragment response to the lora network server.
Optionally, the fourth receiving module is specifically configured to:
and receiving a lora fragment message sent by the lora network server, wherein the size of the lora fragment message is determined according to a second current rate of the lora terminal obtained according to the lora message fragment response when the lora network server starts to perform lora fragmentation on a downlink service data message and sends the lora fragment message each time.
Optionally, the fourth receiving module is specifically configured to:
receiving the lora fragment messages sent by the lora network server, wherein the lora fragment messages are provided with serial numbers which are set by the lora network server for the lora fragment messages sent each time according to the sequence from small to large, and the last lora fragment message is provided with a termination flag bit;
the recombination module is specifically configured to:
and when the lora fragmented messages containing the termination zone bits are received, acquiring the recombined downlink service data messages according to all the received lora fragmented messages.
Optionally, the fourth receiving module is specifically configured to:
when receiving the previous lora slicing message sent by the lora network server, feeding back the first message serial number to the lora network server,
and receiving the current lora slicing message which is sent by the lora network server and corresponds to the first message serial number.
Optionally, the lora packet fragmentation request includes the first length of the downlink service data packet,
the terminal further comprises:
and the checking module is used for checking the second length of the recombined downlink service data message according to the first length of the downlink service data message.
The embodiment of the invention has the beneficial effects that: when the length of the downlink service data message exceeds the message length supported by the current lora use rate, the transmission of a longer message can be supported.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described 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 that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a method provided by an embodiment of the present invention;
FIG. 2 is a flow chart of a method provided by an embodiment of the present invention;
FIG. 3 is a flow chart of a method provided by an embodiment of the present invention;
FIG. 4 is a flow chart of a method provided by an embodiment of the present invention;
fig. 5 is a structural diagram of a server according to an embodiment of the present invention;
fig. 6 is a diagram of a terminal structure according to an embodiment of the present invention;
fig. 7 is a diagram of a terminal structure according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and 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.
An embodiment of the present invention provides a method for transmitting a lora packet, as shown in fig. 1, including:
s101, receiving a downlink service data message sent to a first terminal by an application server;
s103, when an uplink message sent by the first terminal is received, determining a downlink service data message corresponding to the terminal identifier according to the terminal identifier in the uplink message;
s105, when the length of the downlink service data message exceeds the maximum message length supported by the first current rate of the first terminal, sending a lora message fragmentation request for performing lora fragmentation transmission on the downlink service data message to the first terminal;
s107, receiving a lora message fragment response sent by the first terminal when the first terminal determines that the lora message fragment is supported according to the lora message fragment request;
and S109, performing lora fragmentation on the downlink service data message, determining the message sending rate when sending the lora fragmentation message each time, determining the size of the lora fragmentation message sent each time according to the message sending rate, and sending each lora fragmentation message to the first terminal, so that the first terminal can obtain the recombined downlink service data message according to all the received lora fragmentation messages.
Optionally, in an embodiment of the present invention, the lora packet fragmentation request includes a fragmentation identifier, and step S107 specifically includes:
and receiving a lora message fragment response sent by the first terminal according to the lora message fragment request when the fragment identifier is identified.
Optionally, in an embodiment of the present invention, step S109 specifically includes:
and when the lora fragment message is sent each time, acquiring a second current rate of the first terminal according to the lora fragment response, determining the size of the lora fragment message sent each time according to the second current rate, and sending each lora fragment message to the first terminal so that the first terminal can obtain a recombined downlink service data message according to all the received lora fragment messages.
Optionally, in an embodiment of the present invention, step S109 specifically includes:
determining the message sending rate when sending the lora fragment messages each time, determining the size of the lora fragment messages sent each time according to the message sending rate, setting the sequence number of the lora fragment messages sent each time according to the sequence from small to large, setting a termination flag bit in the last lora fragment message, sending the lora fragment messages corresponding to the first message sequence number to the first terminal according to the first message sequence number fed back by the first terminal when receiving the lora fragment messages, and sending the lora fragment messages containing the termination flag bit to the first terminal, so that the first terminal stops feeding back the first message sequence number according to the termination flag bit and obtains recombined downlink service data messages according to all the received lora fragment messages.
For example, the sequence number of the first sent lora fragment message is 1, the sequence number of the second sent lora fragment message is 2, and so on, until all the lora fragment messages are sent out, the last lora fragment message includes a termination flag bit, as an improvement, in a specific embodiment, when the first terminal receives the lora fragment message with the sequence number of 1, the first terminal actively feeds back a message sequence number 2, so that an entity sending the lora fragment message can determine that the sequence number of the current lora message to be sent to the first terminal is 2 according to the message sequence number, if the first terminal finds that the message sequence number is not 2 when receiving the lora fragment message, the message is discarded, thereby ensuring that the lora fragment messages received by the terminal cannot be out of order.
Optionally, in an embodiment of the present invention, the lora packet fragmentation request includes a first length of the downlink service data packet, and in step S109, the step of sending each lora fragment packet to the first terminal, so that the step of obtaining, by the first terminal, the reassembled downlink service data packet according to all received lora fragment packets specifically includes:
and sending each lora fragment message to the first terminal so that the first terminal can check the second length of the recombined downlink service data message according to the first length of the downlink service data message after obtaining the recombined downlink service data message according to all the received lora fragment messages.
The embodiment of the invention has the beneficial effects that: when the length of the downlink service data message exceeds the message length supported by the current lora use rate, the transmission of a longer message can be supported.
Another aspect of the embodiments of the present invention is to provide a method for transmitting a lora packet, which is applied to a lora terminal, and as shown in fig. 2, the method includes:
s201, receiving a lora message fragmentation request that a lora network server performs lora fragmentation transmission on a downlink service data message stored by the lora network server, wherein the lora message fragmentation request is sent after the lora network server receives a downlink service data message sent by an application server to a lora terminal and receives an uplink message sent by the lora terminal, the lora message fragmentation request is sent after the downlink service data message corresponding to a terminal identifier is determined according to the terminal identifier in the uplink message and the length of the downlink service data message exceeds the maximum message length supported by the first current rate of the lora terminal;
s203, when the support of the lora message fragments is determined according to the lora message fragment request, a lora message fragment response is sent to the lora network server;
s205, receiving a lora fragment message sent by the lora network server, wherein the size of the lora fragment message is determined according to the sending rate of the message each time the lora fragment message is sent after the lora network server starts to perform lora fragmentation on a downlink service data message;
and S207, acquiring the recombined downlink service data message according to all the received lora slicing messages.
Optionally, in an embodiment of the present invention, the lora packet fragmentation request includes a fragmentation identifier, and step S203 specifically includes:
and when the fragment identification is identified according to the lora message fragment request, sending a lora message fragment response to the lora network server.
Optionally, in an embodiment of the present invention, step S205 specifically includes:
and receiving a lora fragment message sent by the lora network server, wherein the size of the lora fragment message is determined according to a second current rate of the lora terminal obtained according to the response of the lora message fragment when the lora network server starts to perform lora fragmentation on a downlink service data message each time the lora fragment message is sent.
Optionally, in an embodiment of the present invention, as shown in fig. 3, in step S205, the step of receiving the lora fragment packet sent by the lora network server specifically includes:
s2051, receiving the lora fragment messages sent by the lora network server, wherein the lora fragment messages are provided with sequence numbers which are set by the lora network server for the lora fragment messages sent each time according to the sequence from small to large, and the last lora fragment message is provided with a termination flag bit;
step S207 specifically includes:
and S2071, when the lora slicing message containing the termination flag bit is received, obtaining the recombined downlink service data message according to all the received lora slicing messages.
Optionally, in an embodiment of the present invention, as shown in fig. 4, in step S205, the step of receiving the lora fragment packet sent by the lora network server specifically includes:
s2053, when receiving the previous lora slicing message sent by the lora network server, feeding back the first message serial number to the lora network server,
and S2055, receiving the current lora fragment message which is sent by the lora network server and corresponds to the first message sequence number.
Optionally, in an embodiment of the present invention, the lora packet fragmentation request includes a first length of the downlink service data packet,
step S207 specifically includes:
and after obtaining the recombined downlink service data message according to all the received lora fragment messages, checking the second length of the recombined downlink service data message according to the first length of the downlink service data message.
The embodiment of the invention has the beneficial effects that: when the length of the downlink service data message exceeds the message length supported by the current lora use rate, the transmission of a longer message can be supported.
Another aspect of the embodiments of the present invention is to provide a server for transmitting a lora packet, as shown in fig. 5, including:
a first receiving module 301, configured to receive a downlink service data packet sent by an application server to a first terminal;
a determining module 303, configured to determine, when an uplink packet sent by the first terminal is received, a downlink service data packet corresponding to a terminal identifier according to the terminal identifier in the uplink packet;
a first sending module 305, configured to send a lora packet fragmentation request for performing lora fragmentation transmission on the downlink service data packet to the first terminal when the length of the downlink service data packet exceeds the maximum packet length supported by the first current rate of the first terminal;
a second receiving module 307, configured to receive a lora message fragment response sent when the first terminal determines that the lora message fragment is supported according to the lora message fragment request;
a fragmentation module 309, configured to perform lora fragmentation on the downlink service data packet, determine a packet sending rate when sending a lora fragmentation packet each time, and determine the size of the lora fragmentation packet sent each time according to the packet sending rate;
the second sending module 311 is configured to send each lora segment packet to the first terminal, so that the first terminal obtains a reassembled downlink service data packet according to all the received lora segment packets.
Optionally, in an embodiment of the present invention, the lora packet fragmentation request includes a fragmentation identifier, and the second receiving module 307 is specifically configured to:
and receiving a response of the lora message fragments sent by the first terminal when the first terminal determines that the lora message fragments are supported according to the lora message fragment request.
Optionally, in an embodiment of the present invention, the fragmentation module 309 is specifically configured to perform lora fragmentation on the downlink service data packet, obtain, according to the lora packet fragmentation response, a second current rate of the first terminal when the lora fragmentation packet is sent each time, and determine, according to the second current rate, a size of the lora fragmentation packet sent each time.
Optionally, in an embodiment of the present invention, the fragmentation module 309 is specifically configured to perform lora fragmentation on the downlink service data packet, determine a packet sending rate each time the lora fragmentation packet is sent, determine the size of the lora fragmentation packet sent each time according to the packet sending rate, set the sequence number of the lora fragmentation packet sent each time in a descending order, set a termination flag bit in the last lora fragmentation packet,
the second sending module 311 is specifically configured to, according to a first packet sequence number fed back by the first terminal when receiving a lora fragment packet, send the lora fragment packet corresponding to the first packet sequence number to the first terminal, and send the lora fragment packet including a termination flag to the first terminal, so that the first terminal stops feeding back the first packet sequence number according to the termination flag and obtains a reassembled downlink service data packet according to all the received lora fragment packets.
Optionally, in an embodiment of the present invention, the lora packet fragmentation request includes a first length of the downlink service data packet,
the second sending module 311 is specifically configured to send each lora segment packet to the first terminal, so that the first terminal obtains a reassembled downlink service data packet according to all received lora segment packets, and then checks a second length of the reassembled downlink service data packet according to the first length of the downlink service data packet.
The embodiment of the invention has the beneficial effects that: when the length of the downlink service data message exceeds the message length supported by the current lora use rate, the transmission of a longer message can be supported.
Another aspect of the embodiments of the present invention is to provide a terminal for transmitting a lora packet, as shown in fig. 6, including:
a third receiving module 401, configured to receive a lora packet fragmentation request that a lora network server performs lora fragmentation transmission on a downlink service data packet stored in the lora network server, where the lora packet fragmentation request is sent by the lora network server when receiving a downlink service data packet sent by an application server to the lora terminal and receiving an uplink packet sent by the lora terminal, and determines, according to a terminal identifier in the uplink packet, the downlink service data packet corresponding to the terminal identifier, and sends the downlink service data packet after the length of the downlink service data packet exceeds the maximum packet length supported by the first current rate of the lora terminal;
a sending module 403, configured to send a lora message fragment response to the lora network server when it is determined that the lora message fragment is supported according to the lora message fragment request;
a fourth receiving module 405, configured to receive a lora fragment message sent by the lora network server, where the size of the lora fragment message is determined according to a message sending rate each time the lora fragment message is sent after the lora network server starts to perform lora fragmentation on a downlink service data message;
and the reassembly module 407 is configured to obtain a reassembled downlink service data packet according to all the received lora fragment packets.
Optionally, the lora message fragmentation request includes a fragmentation identifier, and the sending module is specifically configured to:
and when the fragment identification is identified according to the lora message fragment request, sending a lora message fragment response to the lora network server.
Optionally, in an embodiment of the present invention, the fourth receiving module 405 is specifically configured to:
and receiving a lora fragment message sent by the lora network server, wherein the size of the lora fragment message is determined according to a second current rate of the lora terminal obtained according to the response of the lora message fragment when the lora network server starts to perform lora fragmentation on a downlink service data message each time the lora fragment message is sent.
Optionally, in an embodiment of the present invention, the fourth receiving module 405 is specifically configured to:
receiving the lora fragment messages sent by the lora network server, wherein the lora fragment messages are provided with serial numbers which are set by the lora network server for the lora fragment messages sent each time according to the sequence from small to large, and the last lora fragment message is provided with a termination flag bit;
the restructuring module 407 is specifically configured to:
and when the lora fragmented messages containing the termination zone bits are received, acquiring the recombined downlink service data messages according to all the received lora fragmented messages.
Optionally, in an embodiment of the present invention, the fourth receiving module 405 is specifically configured to:
when receiving the previous lora slicing message sent by the lora network server, feeding back the first message serial number to the lora network server,
and receiving the current lora slicing message which is sent by the lora network server and corresponds to the first message serial number.
Optionally, in an embodiment of the present invention, as shown in fig. 7, the lora packet fragmentation request includes a first length of the downlink service data packet,
the terminal further comprises:
the checking module 409 is configured to check the second length of the reassembled downlink service data packet according to the first length of the downlink service data packet.
The embodiment of the invention has the beneficial effects that: when the length of the downlink service data message exceeds the message length supported by the current lora use rate, the transmission of a longer message can be supported.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, 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, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (22)

1. A method for transmitting a lora message is applied to a server, and is characterized by comprising the following steps:
receiving a downlink service data message sent to a first terminal by an application server;
when an uplink message sent by the first terminal is received, determining a downlink service data message corresponding to the terminal identifier according to the terminal identifier in the uplink message;
when the length of the downlink service data message exceeds the maximum message length supported by the first current rate of the first terminal, sending a lora message fragmentation request for performing lora fragmentation transmission on the downlink service data message to the first terminal;
receiving a lora message fragment response sent by the first terminal when the first terminal determines that the lora message fragment is supported according to the lora message fragment request;
performing lora fragmentation on the downlink service data message, determining a message sending rate when the lora fragmentation message is sent each time, determining the size of the lora fragmentation message sent each time according to the message sending rate, and sending each lora fragmentation message to the first terminal, so that the first terminal can obtain the recombined downlink service data message according to all the received lora fragmentation messages.
2. The method according to claim 1, wherein the lora packet fragmentation request includes a fragmentation identifier, and the step of receiving the lora packet fragmentation response sent by the first terminal when determining that the lora packet fragmentation is supported according to the lora packet fragmentation request specifically includes:
and receiving a lora message fragment response sent by the first terminal according to the lora message fragment request when the fragment identifier is identified.
3. The method according to any one of claims 1-2, wherein the step of determining the message sending rate each time a lora fragment message is sent, determining the size of the lora fragment message sent each time according to the message sending rate, and sending each lora fragment message to the first terminal, so that the first terminal obtains the reassembled downlink service data message according to all received lora fragment messages specifically comprises:
and when the lora fragment message is sent each time, acquiring a second current rate of the first terminal according to the lora fragment response, determining the size of the lora fragment message sent each time according to the second current rate, and sending each lora fragment message to the first terminal so that the first terminal can obtain a recombined downlink service data message according to all the received lora fragment messages.
4. The method according to any one of claims 1-2, wherein the step of determining the message sending rate each time a lora fragment message is sent, determining the size of the lora fragment message sent each time according to the message sending rate, and sending each lora fragment message to the first terminal, so that the first terminal obtains the reassembled downlink service data message according to all received lora fragment messages specifically comprises:
determining the message sending rate when sending the lora fragment messages each time, determining the size of the lora fragment messages sent each time according to the message sending rate, setting the sequence number of the lora fragment messages sent each time according to the sequence from small to large, setting a termination flag bit in the last lora fragment message, sending the lora fragment messages corresponding to the first message sequence number to the first terminal according to the first message sequence number fed back by the first terminal when receiving the lora fragment messages, and sending the lora fragment messages containing the termination flag bit to the first terminal, so that the first terminal stops feeding back the first message sequence number according to the termination flag bit and obtains recombined downlink service data messages according to all the received lora fragment messages.
5. The method according to claim 1, wherein the lora packet fragmentation request includes a first length of the downlink service data packet, and the step of sending each lora fragment packet to the first terminal so that the first terminal obtains the reassembled downlink service data packet according to all received lora fragment packets specifically includes:
and sending each lora fragment message to the first terminal so that the first terminal can check the second length of the recombined downlink service data message according to the first length of the downlink service data message after obtaining the recombined downlink service data message according to all the received lora fragment messages.
6. A method for transmitting a lora message is applied to a lora terminal, and comprises the following steps:
receiving a lora message fragmentation request that a lora network server performs lora fragmentation transmission on downlink service data messages stored by the lora network server, wherein the lora message fragmentation request is sent when the lora network server receives the downlink service data messages sent by an application server to the lora terminal and receives the uplink messages sent by the lora terminal, the lora message fragmentation request is sent when the downlink service data messages corresponding to terminal identifiers are determined according to terminal identifiers in the uplink messages, and the lora message fragmentation request is sent when the length of the downlink service data messages exceeds the maximum message length supported by a first current rate of the lora terminal;
when the support of the lora message fragments is determined according to the lora message fragment request, a lora message fragment response is sent to the lora network server;
receiving a lora fragment message sent by the lora network server, wherein the size of the lora fragment message is determined according to a message sending rate when the lora network server sends the lora fragment message each time after starting to perform lora fragmentation on a downlink service data message;
and acquiring the recombined downlink service data message according to all the received lora slicing messages.
7. The method according to claim 6, wherein the lora packet fragmentation request includes a fragmentation identifier, and the step of sending the lora packet fragmentation response to the lora network server when it is determined that the lora packet fragmentation is supported according to the lora packet fragmentation request specifically includes:
and when the fragment identification is identified according to the lora message fragment request, sending a lora message fragment response to the lora network server.
8. The method according to any one of claims 6 to 7, wherein the receiving the lora slice sent by the lora network server, the size of the lora slice packet is determined according to a packet sending rate when the lora slice packet is sent each time after the lora network server starts to perform lora slice on a downlink service data packet, specifically comprises:
and receiving a lora fragment message sent by the lora network server, wherein the size of the lora fragment message is determined according to a second current rate of the lora terminal obtained according to the lora message fragment response when the lora network server starts to perform lora fragmentation on a downlink service data message and sends the lora fragment message each time.
9. The method according to claim 6, wherein the step of receiving the lora fragmentation messages sent by the lora network server specifically comprises:
receiving the lora fragment messages sent by the lora network server, wherein the lora fragment messages are provided with serial numbers which are set by the lora network server for the lora fragment messages sent each time according to the sequence from small to large, and the last lora fragment message is provided with a termination flag bit;
the step of obtaining the recombined downlink service data message according to all the received lora fragmentation messages specifically comprises the following steps:
and when the lora fragmented messages containing the termination zone bits are received, acquiring the recombined downlink service data messages according to all the received lora fragmented messages.
10. The method according to claim 6, wherein the step of receiving the lora fragmentation messages sent by the lora network server specifically comprises:
when receiving the previous lora slicing message sent by the lora network server, feeding back the first message serial number to the lora network server,
and receiving the current lora slicing message which is sent by the lora network server and corresponds to the first message serial number.
11. The method of claim 6, wherein the lora packet fragmentation request includes a first length of the downlink traffic data packet,
the step of obtaining the recombined downlink service data message according to all the received lora slicing messages specifically includes:
and after obtaining the recombined downlink service data message according to all the received lora fragment messages, checking the second length of the recombined downlink service data message according to the first length of the downlink service data message.
12. A server for transmitting a lora packet, comprising:
the first receiving module is used for receiving a downlink service data message sent to the first terminal by the application server;
a determining module, configured to determine, when an uplink packet sent by the first terminal is received, a downlink service data packet corresponding to a terminal identifier according to the terminal identifier in the uplink packet;
a first sending module, configured to send a lora packet fragmentation request for performing lora fragmentation transmission on the downlink service data packet to the first terminal when the length of the downlink service data packet exceeds a maximum packet length supported by a first current rate of the first terminal;
the second receiving module is used for receiving a lora message fragment response sent by the first terminal when the first terminal determines that the lora message fragment is supported according to the lora message fragment request;
the fragmentation module is used for carrying out lora fragmentation on the downlink service data message, determining the message sending rate when the lora fragmentation message is sent each time, and determining the size of the lora fragmentation message sent each time according to the message sending rate;
and the second sending module is used for sending each lora fragment message to the first terminal so that the first terminal can obtain the recombined downlink service data message according to all the received lora fragment messages.
13. The server according to claim 12, wherein the lora packet fragmentation request includes a fragmentation identifier, and the second receiving module is specifically configured to:
and receiving a response of the lora message fragments sent by the first terminal when the first terminal determines that the lora message fragments are supported according to the lora message fragment request.
14. The server according to any one of claims 12-13,
the fragmentation module is specifically configured to perform lora fragmentation on the downlink service data packet, obtain a second current rate of the first terminal according to the lora packet fragmentation response when transmitting the lora fragmentation packet each time, and determine the size of the lora fragmentation packet transmitted each time according to the second current rate.
15. The server according to any one of claims 12-13,
the fragmentation module is specifically used for carrying out lora fragmentation on the downlink service data message, determining the message sending rate when sending the lora fragmentation message each time, determining the size of the lora fragmentation message sent each time according to the message sending rate, setting the serial number of the lora fragmentation message sent each time according to the sequence from small to large, setting a stop flag bit in the last lora fragmentation message,
the second sending module is specifically configured to send, according to a first packet sequence number fed back by the first terminal when receiving the lora fragment packet, the lora fragment packet corresponding to the first packet sequence number to the first terminal, and send the lora fragment packet including a termination flag to the first terminal, so that the first terminal stops feeding back the first packet sequence number according to the termination flag and obtains a reassembled downlink service data packet according to all the received lora fragment packets.
16. The server according to claim 12, wherein the lora packet fragmentation request includes a first length of the downlink traffic data packet,
the second sending module is specifically configured to send each lora fragment packet to the first terminal, so that the first terminal obtains a reassembled downlink service data packet according to all received lora fragment packets, and then checks a second length of the reassembled downlink service data packet according to the first length of the downlink service data packet.
17. A terminal for transmitting a lora message, comprising:
a third receiving module, configured to receive a lora packet fragmentation request that a lora network server performs lora fragmentation transmission on a downlink service data packet stored in the lora network server, where the lora packet fragmentation request is sent by the lora network server when receiving a downlink service data packet sent by an application server to a lora terminal and receiving an uplink packet sent by the lora terminal, and determines, according to a terminal identifier in the uplink packet, the downlink service data packet corresponding to the terminal identifier, and sends the downlink service data packet after the length of the downlink service data packet exceeds the maximum packet length supported by the first current rate of the lora terminal;
the sending module is used for sending a lora message fragment response to the lora network server when the lora message fragment supporting request is determined according to the lora message fragment request;
a fourth receiving module, configured to receive a lora fragment packet sent by the lora network server, where the size of the lora fragment packet is determined according to a packet sending rate when the lora network server starts to perform lora fragmentation on a downlink service data packet and sends the lora fragment packet each time;
and the restructuring module is used for obtaining the restructured downlink service data message according to all the received lora slicing messages.
18. The terminal of claim 17, wherein the lora packet fragmentation request includes a fragmentation identifier, and the sending module is specifically configured to:
and when the fragment identification is identified according to the lora message fragment request, sending a lora message fragment response to the lora network server.
19. The terminal according to any of claims 17 to 18, wherein the fourth receiving module is specifically configured to:
and receiving a lora fragment message sent by the lora network server, wherein the size of the lora fragment message is determined according to a second current rate of the lora terminal obtained according to the response of the lora message fragment when the lora network server starts to perform lora fragmentation on a downlink service data message each time the lora fragment message is sent.
20. The terminal of claim 17,
the fourth receiving module is specifically configured to:
receiving the lora fragment messages sent by the lora network server, wherein the lora fragment messages are provided with serial numbers which are set by the lora network server for the lora fragment messages sent each time according to the sequence from small to large, and the last lora fragment message is provided with a termination flag bit;
the recombination module is specifically configured to:
and when the lora fragmented messages containing the termination zone bits are received, acquiring the recombined downlink service data messages according to all the received lora fragmented messages.
21. The terminal of claim 17, wherein the fourth receiving module is specifically configured to:
when receiving the previous lora slicing message sent by the lora network server, feeding back the first message serial number to the lora network server,
and receiving the current lora slicing message which is sent by the lora network server and corresponds to the first message serial number.
22. The terminal of claim 17, wherein the lora packet fragmentation request includes a first length of the downlink traffic data packet,
the terminal further comprises:
and the checking module is used for checking the second length of the recombined downlink service data message according to the first length of the downlink service data message.
CN201810516033.XA 2018-05-25 2018-05-25 Method, terminal and server for transmitting lora message Active CN108900433B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810516033.XA CN108900433B (en) 2018-05-25 2018-05-25 Method, terminal and server for transmitting lora message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810516033.XA CN108900433B (en) 2018-05-25 2018-05-25 Method, terminal and server for transmitting lora message

Publications (2)

Publication Number Publication Date
CN108900433A CN108900433A (en) 2018-11-27
CN108900433B true CN108900433B (en) 2022-06-21

Family

ID=64343217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810516033.XA Active CN108900433B (en) 2018-05-25 2018-05-25 Method, terminal and server for transmitting lora message

Country Status (1)

Country Link
CN (1) CN108900433B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110198203A (en) * 2019-06-14 2019-09-03 中国人民解放军陆军工程大学 Method for controlling data transmission rate
CN110677354A (en) * 2019-12-04 2020-01-10 武汉慧联无限科技有限公司 Message transmission method, terminal and server
CN111162871B (en) * 2019-12-13 2022-07-26 深圳市瑞科慧联科技有限公司 Data transmission method and system based on LoRa
CN112367409B (en) * 2021-01-14 2021-04-27 广州技象科技有限公司 Internet of things node data transmission control method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360555A (en) * 2016-05-10 2017-11-17 北京信威通信技术股份有限公司 Method for message transmission and device
US10567495B2 (en) * 2016-11-16 2020-02-18 Cisco Technology, Inc. Application based intelligent edge computing in a low power wide area network environment
CN107567107B (en) * 2017-09-29 2021-04-20 新华三技术有限公司 Data transmission method and device

Also Published As

Publication number Publication date
CN108900433A (en) 2018-11-27

Similar Documents

Publication Publication Date Title
CN108900433B (en) Method, terminal and server for transmitting lora message
CN1494296B (en) Defining network path transmission unit
CN106877977B (en) Data communication method, device and system
CN112242956B (en) Flow rate control method and device
CN112422489B (en) Service data transmission method, device, computer equipment and storage medium
CN110677200A (en) Data transmission method and device
US8189618B2 (en) System and method for robust data loss recovery in a wireless local area network
CN110831010A (en) Multichannel data sending and receiving method and device and data transmission system
US8627074B1 (en) Secure block acknowledgement mechanism for use in communication networks
CN107508828B (en) A kind of very-long-range data interaction system and method
CN114301576B (en) Method and communication device for generating and transmitting acknowledgement frames in an IEEE802.15.4 network
EP3672189B1 (en) Data transmission method, device and system
CN105471660B (en) A kind of data capture method suitable for novel low orbit satellite platform
CN112737967B (en) Method for realizing IPv4 GRE message load balancing based on Flow Director
CN110912942B (en) Method for reducing UDP message sending time delay
CN112714159A (en) Message forwarding method and device, storage medium and electronic device
EP2203025A1 (en) Method for transmitting sms and sms platform
WO2022001737A1 (en) Data transmission method and apparatus, and computer storage medium
EP2876830A1 (en) Data transmission method and device
CN104253811A (en) Network packet communication method and system
CN109379342B (en) UDP network protocol-based upper computer and DSP data transmission method
WO2017067224A1 (en) Packet processing method and apparatus
CN111865884B (en) Message processing method, device and equipment
CN108173807B (en) Unified message sending and processing method and device
CN113424578A (en) Transmission control protocol acceleration method and device

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
GR01 Patent grant
GR01 Patent grant