CN110875952A - Data response processing method and equipment based on Internet of things and storage medium - Google Patents

Data response processing method and equipment based on Internet of things and storage medium Download PDF

Info

Publication number
CN110875952A
CN110875952A CN201811027689.1A CN201811027689A CN110875952A CN 110875952 A CN110875952 A CN 110875952A CN 201811027689 A CN201811027689 A CN 201811027689A CN 110875952 A CN110875952 A CN 110875952A
Authority
CN
China
Prior art keywords
internet
things
message
terminal
request message
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
CN201811027689.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 Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
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 Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811027689.1A priority Critical patent/CN110875952A/en
Publication of CN110875952A publication Critical patent/CN110875952A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1861Physical mapping arrangements

Abstract

The invention discloses a data response processing method based on the Internet of things, which comprises the following steps: receiving a request message sent by an Internet of things platform; the request message is a message requiring the terminal of the Internet of things to respond; sending a confirmation message to the Internet of things platform and not sending a response message based on the request message; the confirmation message is used for indicating the terminal of the internet of things to receive the request message; the response message is used for carrying response data corresponding to the request message. The embodiment of the invention also discloses a device and a storage medium.

Description

Data response processing method and equipment based on Internet of things and storage medium
Technical Field
The invention relates to the technical field of network communication, in particular to a data response processing method and device based on the Internet of things and a storage medium.
Background
The Internet of things (IoT) is capable of connecting articles in daily life together based on existing network communication, so that information exchange and communication can be performed between the articles.
In the related technology, when an IoT platform and an IoT terminal perform data interaction, the IoT platform sends a request message to the IoT terminal; after the terminal receives the request message sent by the server, the IoT terminal needs to respond to the request message, and simultaneously carries the processing result corresponding to the request message in the response message.
However, when the data volume to be processed by the IoT terminal is relatively large, it takes a long time to obtain the processing result corresponding to the request message, so that the IoT terminal cannot timely return a response message to the server. At this time, the IoT platform sets the request message to timeout because it cannot receive the feedback of the terminal within the specified time, and retransmits the request message to the terminal; as such, the IoT terminal may receive multiple repeated request messages, resulting in a waste of network resources. In addition, if the timeout time is simply increased, the time interval for the IoT platform to resend the request message is increased, which affects the performance of the service and increases the power consumption of the IoT terminal.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data response processing method, device, and storage medium based on the internet of things, which solve the problems of network resource waste, excessive power consumption, and the like in the prior art.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a data response processing method based on the internet of things, where the method includes:
receiving a request message sent by an Internet of things platform; the request message is a message requiring the response of the terminal of the Internet of things;
sending a confirmation message and not sending a response message to the Internet of things platform based on the request message;
the confirmation message is used for indicating the terminal of the internet of things to receive the request message; the response message is used for carrying response data corresponding to the request message.
In a second aspect, an embodiment of the present invention provides a data response processing method based on the internet of things, where the method includes:
sending a request message to an Internet of things terminal, and starting a first timer; the request message is a message requiring the terminal of the Internet of things to respond;
if a confirmation message aiming at the request message sent by the terminal of the internet of things is received within a first timing duration timed by the first timer, starting a second timer; the confirmation message is used for indicating the terminal of the Internet of things to receive the request message;
and detecting a response message aiming at the request message sent by the terminal of the Internet of things within a second timing duration timed by the second timer.
In a third aspect, an embodiment of the present invention provides an internet of things terminal, where the internet of things terminal includes:
the receiving unit is used for receiving a request message sent by the Internet of things platform; the request message is a message requiring the platform of the Internet of things to respond;
the first processing unit is used for sending a confirmation message to the Internet of things platform and not sending a response message based on the request message; the confirmation message is used for indicating the terminal of the internet of things to receive the request message; the response message is used for carrying response data corresponding to the request message.
In a fourth aspect, an embodiment of the present invention provides an internet of things platform, where the internet of things platform includes:
the sending unit is used for sending a request message to the terminal of the Internet of things; the request message is a message requiring the terminal of the Internet of things to respond;
and the second processing unit is used for starting the first timer when sending the request message to the terminal of the Internet of things.
The second processing unit is further configured to start a second timer if a confirmation message for the request message sent by the internet of things terminal is received within a first timing duration timed by the first timer; the confirmation message is used for indicating the terminal of the Internet of things to receive the request message;
and the detection unit is used for detecting a response message aiming at the request message sent by the terminal of the internet of things within a second timing duration timed by the second timer.
In a fifth aspect, an embodiment of the present invention provides an internet of things terminal, where the internet of things terminal includes: a first processor and a first memory configured to store a computer program capable of running on the processor,
wherein the first processor is configured to perform the steps of the method of the first aspect when executing the computer program.
In a sixth aspect, an embodiment of the present invention provides an internet of things platform, where the internet of things platform includes: a second processor and a second memory configured to store a computer program capable of running on the processor,
wherein the second processor is configured to perform the steps of the method of the second aspect when executing the computer program.
In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores one or more programs that are executable by one or more processors to implement the steps of the data response processing method based on the internet of things according to the first aspect or the second aspect.
According to the data response processing method, the data response processing device and the data response processing storage medium, after a request message sent by an Internet of things platform is received, a confirmation message is sent to the Internet of things platform based on the request message, and no response message is sent, wherein the confirmation message is used for indicating that the Internet of things terminal receives the request message; the response message is used for carrying response data corresponding to the request message; therefore, after the terminal of the Internet of things receives the request message, a confirmation message is timely replied to the platform of the Internet of things to inform the platform of the Internet of things that the request message is received. Therefore, under the condition of not increasing the time for retransmitting the request message, the problem that the Internet of things platform repeatedly sends the same request message because the confirmation message is not received in the specified time is avoided, the utilization rate of resources is improved, the service performance is improved, and the power consumption of the terminal is reduced.
Drawings
In the drawings, which are not necessarily drawn to scale, like reference numerals may describe similar components in different views. The drawings illustrate generally, by way of example, but not by way of limitation, various embodiments discussed herein.
Fig. 1 is a schematic flow chart of a data response processing method based on the internet of things according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of another data response processing method based on the internet of things according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a CoAP message structure provided in the embodiment of the present invention;
fig. 4 is a schematic flow chart of another data response processing method based on the internet of things according to an embodiment of the present invention;
fig. 5 is a schematic structural component diagram of an internet of things terminal according to an embodiment of the present invention;
fig. 6 is a schematic structural component diagram of an internet of things platform according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a hardware structure of an internet of things terminal according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of an internet of things platform according to an embodiment of the present invention.
Detailed Description
So that the manner in which the features and elements of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings.
The IoT technology is widely applied to network convergence through communication sensing technologies such as intelligent sensing, identification technology and pervasive computing, and is therefore also called the third wave of development of the world information industry after computers and the internet. In IoT, many devices have only a small amount of memory space and limited computing power, so that the application of the conventional hypertext transfer Protocol (HTTP) to the internet of things is too bulky and unsuitable; therefore, the Lightweight Machine to Machine (LwM 2M) protocol should be generated.
In practical applications, the LwM2M protocol is an Open Mobile Alliance (OMA) organization, which proposes a lightweight internet of things application layer protocol, and is widely used in an IoT network with limited resources. Wherein the bottom layer of the LwM2M protocol is implemented based on CoAP. CoAP defines four different message types, including CON, NON, ACK, and RST. In particular, the CON message type is used to indicate that the message needs to be acknowledged by the receiver, i.e. if a request message of CON type is sent, the receiver has to respond to the request message. The NON message type is used to indicate that the message does not need to be acknowledged, i.e. the recipient does not have to respond if a NON type request message is sent. The ACK message type is used to indicate that the sent message is an acknowledgement message, and is generally a response message corresponding to the CON type message. The RST message type is used for indicating that the sent message is a reset message.
Generally, after receiving the request message of the CON type, the IoT terminal replies an ACK type response message, where the ACK type response message carries a processing result for the request message. For example, the IoT platform sends a request message of CON type to the IoT terminal requesting to read the state information of the current terminal; and after receiving the request message, the IoT terminal writes the state information read by the terminal into the data load of the ACK type response message and returns the ACK type response message to the IoT platform.
However, the IoT module and the application of the terminal are distributed on different chip modules, a certain time is required for communication between the IoT module and the application, and when the amount of data to be processed is relatively large, the processing capability of the IoT terminal is limited, and a long time is required for returning the processing result. At this time, the IoT platform sets the request message of the CON type to timeout because it cannot receive the feedback of the terminal within the specified time, and retransmits the request message to the terminal; thus, the terminal may receive multiple repeated request messages, resulting in a waste of network resources. In addition, if the timeout time is simply increased, the time interval for the IoT platform to resend the request message is increased, which affects the performance of the service and increases the power consumption of the IoT terminal.
In order to solve the above problem, an embodiment of the present invention provides a data response processing method based on the internet of things, and as shown in fig. 1, the method includes the following steps:
step 101, receiving a request message sent by an internet of things platform.
The request message is a message requiring the response of the terminal of the internet of things.
In other embodiments of the present invention, the receiving of the request message sent by the internet of things platform in step 101 may be implemented by the internet of things terminal; here, the internet of things terminal may be any type of IoT terminal, and is capable of collecting data and transmitting the data to the internet through various network interface modes; the internet of things platform may be an IoT server to manage the IoT terminal. In this embodiment, a communication connection may be established between the terminal of the internet of things and the platform of the internet of things in a wireless manner, and data interaction may be performed through the wireless connection.
In other embodiments of the present invention, the request message in step 101 is a message that requires the terminal of the internet of things to respond, that is, the request message is a CON type message; after the terminal of the internet of things receives the request message, a response needs to be made to the request message.
And 102, sending a confirmation message to the Internet of things platform based on the request message, and not sending a response message.
Based on the request message, the internet of things platform sending the confirmation message and not sending the response message in step 102 may be implemented by the internet of things terminal.
In other embodiments of the present invention, the terminal of the internet of things does not send a response message while sending the confirmation message. Here, the response message is used to carry response data corresponding to the request message; that is to say, the response message is a message carrying a response result, and the response result corresponds to the request message and is a result of the terminal of the internet of things after processing the request message.
Further, the confirmation message is also used for indicating that the current response message is not ready to be completed and the internet of things platform is required to keep waiting for the response message. That is to say, after receiving the request message, the terminal of the internet of things does not directly process the request message, but first sends a confirmation message to identify that the request message has arrived, but the response message is not ready yet, and the platform of the internet of things is required to continue to wait for the corresponding response message.
In another embodiment, after receiving the request message, the terminal of the internet of things may send a confirmation message to the platform of the internet of things within a preset time period, and does not send a response message. Here, the preset time period is used for indicating a preset time duration after the moment when the request message is received from the terminal of the internet of things; wherein, the preset time refers to a shorter time, for example, 0 second to 50 milliseconds; the terminal of the internet of things immediately responds to the request message after receiving the request message, sends a confirmation message to the platform of the internet of things to inform the platform of the internet of things that the request message is successfully received, and confirms that the current network is unobstructed to the platform of the internet of things.
According to the data response processing method, the data response processing device and the data response processing storage medium, after a request message sent by an Internet of things platform is received, a confirmation message is sent to the Internet of things platform based on the request message, and no response message is sent; the confirmation message is used for indicating the terminal of the Internet of things to receive the request message; the response message is used for carrying response data corresponding to the request message; therefore, after the terminal of the Internet of things receives the request message, a confirmation message is immediately replied to the platform of the Internet of things to inform the platform of the Internet of things that the request message is received, and the platform of the Internet of things counts again to wait for a data processing result after the terminal of the Internet of things sends. Therefore, under the condition of not increasing the time for retransmitting the request message, the problem that the Internet of things platform repeatedly sends the same request message because the confirmation message is not received in the specified time is avoided, the utilization rate of resources is improved, the service performance is improved, and the power consumption of the terminal is reduced.
The embodiment of the invention provides a data response processing method based on the Internet of things, and as shown in figure 2, the method comprises the following steps:
step 201, sending a request message to the terminal of the internet of things, and starting a first timer.
The request message is a message requiring the terminal of the internet of things to respond.
In other embodiments of the present invention, the step 201 of sending the request message to the terminal of the internet of things, and starting the first timer may be implemented by the platform of the internet of things. Here, the internet of things platform may be an IoT server for managing the IoT terminal. The internet of things terminal is any type of internet of things terminal, can collect data and transmits the data to the internet through various network interface modes.
In the above scheme, the request message in step 201 is a message that requires a response of the terminal of the internet of things, that is, the request message is a CON type message; after the terminal of the internet of things receives the request message, a response needs to be made to the request message.
In other embodiments of the present invention, in order to prevent the loss of the sent request message, so that the internet of things platform cannot receive the confirmation message returned by the internet of things terminal, the internet of things platform may further be provided with a first timer; the first timer can be used for recording the time when the internet of things platform receives the confirmation message sent by the internet of things terminal.
Step 202, if a confirmation message aiming at the request message sent by the internet of things terminal is received within a first timing duration timed by the first timer, starting a second timer.
The confirmation message is used for indicating the internet of things terminal to receive the request message.
In other embodiments of the present invention, if the confirmation message for the request message sent by the internet of things terminal is received within the first timing duration timed by the first timer in step 202, starting the second timer may be implemented by the internet of things platform. Here, the first timing duration refers to a time length preset by the internet of things platform, and is used for judging whether the time for the internet of things platform to receive the confirmation message is overtime.
Specifically, if the internet of things platform receives the confirmation message within the first timing duration, it indicates that the internet of things platform receives the confirmation message without timeout; and if the current network is unobstructed, the platform of the internet of things continues to wait for subsequent response messages. Here, in order to prevent the response message from being lost, the response message returned by the terminal of the internet of things cannot be received; the Internet of things platform can be provided with a second timer; wherein the second timer is used for recording the time of returning the response message.
In addition, if the confirmation message is not received within the first timing duration, the time for the internet of things platform to receive the confirmation message is over. Here, after the reception confirmation message is judged to be overtime, the internet of things platform retransmits the request message to the internet of things terminal.
Step 203, detecting a response message aiming at the request message sent by the terminal of the internet of things within a second timing duration timed by the second timer.
Here, the step 203 may be implemented by the internet of things platform, within a second timing duration timed by the second timer, to detect a response message sent by the internet of things terminal for the request message. And the second timing duration is a time length preset by the Internet of things platform and is used for judging whether the Internet of things platform receives the response message overtime.
Specifically, if the internet of things platform receives the confirmation message within the second timing duration, it indicates that the internet of things platform receives the response message without being overtime. Here, the response message carries the processing data of the request message, and when the internet of things platform receives the response message on time, it indicates that the request operation is completed.
And if the Internet of things platform does not receive the confirmation message within the second timing duration, the Internet of things platform is indicated to receive the response message overtime. At this time, the internet of things platform sends the request message to the internet of things terminal again.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
According to the data response processing method, the data response processing equipment and the data response processing storage medium based on the Internet of things, after the Internet of things platform sends the request message, the Internet of things platform firstly receives a confirmation message, wherein the confirmation message is used for informing the Internet of things platform that the request message has been successfully received by the Internet of things terminal, so that the Internet of things platform can obtain that the current network is unobstructed; and then, the Internet of things platform continues to wait for a response message returned by the Internet of things terminal. Therefore, the situation that the same request message is repeatedly sent when the Internet of things platform does not receive the confirmation message within the set time is avoided, the resource utilization rate is improved, the service performance is improved, and the power consumption of the terminal is reduced.
Based on the foregoing embodiments, an embodiment of the present invention provides a data response processing method based on the internet of things, as shown in fig. 3, the method includes the following steps:
step 301, the internet of things platform sends a request message to the internet of things terminal, and starts a first timer.
The request message is a message requiring the terminal of the internet of things to respond.
Here, the request message format is a CoAP message format, and as shown in fig. 4, the CoAP message includes a data packet header and data content; further, the data content includes version number, message type, function code, message number, identification information, data load, and the like.
Wherein, the version number is used for indicating the version number of the CoAP protocol. The message type is used for indicating the type of the message, and comprises the following steps: CON message type, NON message type, ACK message type, and RST message type. The function code is used for representing the message request method and the concrete performance of response; for ease of reading, the function code may be written as a y.xx structure, where 0.XX represents the method type of CoAP request and 2.XX, 4.XX or 5.XX represents some specific representation of CoAP response. For example, when the function code is 0.01 code, it is used to represent that the message request method is a GET (GET) method; when the function code is 0.02 code, the method is used for representing that the message request method is a creation (POST) method; when the function code is 0.03 code, the method is used for representing that the message request method is update (PUT); when the function code is 0.04 code, the method is used for representing that the message request method is a DELETE (DELETE) method; or when the function code is 2.01 code, the message is represented as a message of successful creation return, and the like. A Message number (Message ID) for representing the number of the Message. The identification information (token), which may also be called a request ID, may associate the response message with the previous request message. That is, the device may determine, via the token, to which request the response was replied to. A data payload (payload) for carrying specific data.
In this embodiment, the request message is a CON type message, which is said to be responded to.
Step 302, the terminal of the internet of things receives a request message sent by the platform of the internet of things.
And step 303, the terminal of the internet of things sends a confirmation message to the platform of the internet of things based on the request message.
The confirmation message is used for indicating that the terminal of the internet of things receives the request message, and the current response message is not ready to be completed and needs the platform of the internet of things to keep waiting for the response message.
Specifically, the internet of things terminal acquires a message number and identification information from the request message, and constructs the confirmation message based on the message number and the identification information. The Message number can uniquely identify a Message transmitted in the network, and in this embodiment, is a Message ID. The identification information is used for indicating the request message; here, the identification information refers to token information, and it should be understood that the token information may associate the response message with the previous request message; that is to say, after receiving the request message, the internet of things terminal acquires token information, writes the token information into a returned confirmation message or response message, and sends the returned confirmation message or response message to the internet of things platform, so that the internet of things platform can know which request message corresponds to the confirmation message and the response message. In this way, the internet of things terminal can write the Message ID and token information in the extracted request Message into the corresponding position of the Message of the confirmation Message to construct the confirmation Message.
Preferably, the request message is an ACK message; wherein, the function code of the ACK message is 2.06 code; the 2.06 code is used for representing that the request message is received, and the current response message is not ready to be completed, and the internet of things platform is required to keep waiting for the response message.
As analyzed above, the codes of the function codes include a plurality of codes, and different function code codes are used to indicate different response performances. In this embodiment, in order to characterize that the terminal of the internet of things receives the request message, but the current response message is not ready to be completed, and the platform of the internet of things needs to keep waiting for the response message, a new functional code, that is, a 2.06 code, may be designed. Therefore, after the internet of things platform acquires that the function code in the message is the 2.06 code, the internet of things terminal can be known to have successfully received the request message, and only if the current response message is not completed, the internet of things terminal needs to wait for the response message to be sent.
Step 304, if the internet of things platform receives a confirmation message aiming at the request message sent by the internet of things terminal within the first timing duration timed by the first timer, starting a second timer.
After the internet of things platform receives the confirmation message, the internet of things platform can know that the internet of things terminal successfully receives the request message, but the response message is not ready to be completed. Then, the internet of things platform may start a second timer to start recording the time when the response message is returned.
Preferably, the first timer and the second timer may be the same timing device. After the platform of the internet of things receives the confirmation message, the platform of the internet of things may reset the timing device, that is, the timing device is set to start timing again from 0, where the reset timer is the second timer.
In other embodiments of the present invention, if the internet of things platform does not receive the confirmation message within the first timing duration timed by the first timer, the request message is retransmitted.
Here, if the internet of things platform fails to receive the confirmation message, the request message may be considered to be lost or the current network is not smooth. Then, the internet of things platform resends the request message to the internet of things terminal. It should be noted that, after the internet of things platform sends the request message, the first timer is restarted to record the time when the internet of things platform receives the confirmation message. And re-executing the steps. And if the Internet of things platform does not receive the confirmation message all the time, the Internet of things platform resends the request message again until the maximum retransmission times is reached.
Step 305, the internet of things platform detects a response message aiming at the request message sent by the internet of things terminal within a second timing duration timed by the second timer.
Here, the first timing duration and the second timing duration are preset by the internet of things platform. The first timing duration and the second timing duration can be determined according to the type of the request method; specifically, the request method types include a GET method, a POST method, a PUT method, a DELETE method, and the like, the internet of things platform may analyze whether the request information to be sent is an operation that consumes a relatively long time, and if the request information is an operation that consumes a relatively long time, such as the GET method and the POST method, the first timing duration and the second timing duration may be set to be relatively long; the first and second timing periods may be set to be shorter for operations that take less time, such as the DELETE method.
Preferably, the internet of things platform determines the first timing duration according to the current network smoothness degree; and determining the second timing duration according to the type of the request method and the processing speed of the terminal of the Internet of things.
Here, the first timing duration is used for recording the time when the internet of things platform receives the confirmation message, and it can be known from the analysis in the foregoing that the confirmation message is returned without data processing by the internet of things terminal; therefore, the time for returning the confirmation message is related to the network delay and has no relation to the data processing speed of the terminal of the internet of things. That is, the more unobstructed the network, the faster the acknowledgement message is returned. Therefore, the first timing duration can be flexibly determined according to the network smoothness degree.
In addition, the second timing duration is used for recording the time of the Internet of things platform for receiving the response message; the response time is the time for processing data by the terminal of the internet of things, and therefore, the time for returning the response message is related to the data processing speed and the data volume of the terminal of the internet of things. That is, the internet of things platform may determine the second timing duration according to the type of the request method and the processing speed of the internet of things terminal.
And step 306, the internet of things terminal processes the request message to obtain a response result.
Here, after sending the confirmation message, the terminal of the internet of things starts to process the request content in the request information sent by the platform of the internet of things, and obtains a response result.
Step 307, the internet of things terminal generates a response message based on the response result, and sends the response message to the internet of things platform.
Specifically, the internet of things terminal writes the Message ID and token information obtained in step 303 into a Message of the response Message, and writes the response result obtained in step 306 into a data load structure of the response Message. Thus, a final response message is obtained.
Preferably, the message type of the response message may be set to a NON type.
Illustratively, request information sent by an internet of things platform needs to acquire current state information of an internet of things terminal, and after receiving the request information, the internet of things terminal replies a confirmation message carrying a 2.06 code with a function code to inform the internet of things platform that the request information has been received; and then, the terminal of the Internet of things acquires the state information of the terminal of the Internet of things according to the request content, writes the state information into a response message by taking the state information as a response result, and sends the response message to the platform of the Internet of things.
Step 308, if a response message aiming at the request message sent by the terminal of the internet of things is received within a second timing duration timed by the second timer, the request operation is completed.
In other embodiments of the present invention, step 308 may also be:
and if the Internet of things platform does not receive the response message within the second timing duration timed by the second timer, the request message is sent to the Internet of things terminal again. Here, the internet of things platform fails to receive the response message, and the response message may be considered to be lost. Then, the internet of things platform resends the request message to the internet of things terminal. If the internet of things platform does not receive the response message all the time, the internet of things platform resends the request message again until the maximum retransmission times is reached.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
The embodiment of the invention provides a data response processing method, equipment and a storage medium based on the Internet of things, and the method comprises the steps of firstly, receiving a request message sent by a platform of the Internet of things; the request message is a message requiring the terminal of the Internet of things to respond; based on the request message, sending a confirmation message to the Internet of things platform and not sending a response message, so that the Internet of things platform starts a second timer after receiving the confirmation message and records the time of the Internet of things terminal responding to the request message; therefore, after the terminal of the internet of things receives the request message, a confirmation message is instantly replied to the platform of the internet of things to inform the platform of the internet of things of receiving the request message, and the platform of the internet of things counts again to wait for a data processing result after the terminal of the internet of things sends the request message. Therefore, under the condition that the time for retransmitting the request message is not increased, the phenomenon that the same request message is repeatedly sent by the platform of the Internet of things when the confirmation message is not received within the specified time is avoided, the utilization rate of resources is improved, meanwhile, the service performance is improved, and the power consumption of the terminal is reduced.
In order to implement the method according to the embodiment of the present invention, an embodiment of the present invention further provides an internet of things terminal, as shown in fig. 5, where the internet of things terminal includes:
the receiving unit 51 is configured to receive a request message sent by an internet of things platform; the request message is a message requiring the terminal of the Internet of things to respond;
the first processing unit 52 is configured to send a confirmation message to the internet of things platform based on the request message, and not send a response message;
the confirmation message is used for indicating the terminal of the internet of things to receive the request message; the response message is used for carrying response data corresponding to the request message.
In other embodiments of the present invention, the confirmation message is further used to indicate that the current response message is not ready to be completed, and the internet of things platform is required to keep waiting for the response message.
In other embodiments of the present invention, the acknowledgment message is an ACK message; wherein, the function code in the ACK message is 2.06 code; wherein the 2.06 code is used for representing that the request message is received, and the current response message is not ready to be completed and needs the internet of things platform to keep waiting for the response message.
In order to implement the method according to the embodiment of the present invention, an embodiment of the present invention further provides an internet of things platform, as shown in fig. 6, where the internet of things platform includes:
the sending unit 61 is configured to send a request message to the internet of things terminal; the request message is a message requiring the terminal of the Internet of things to respond;
the second processing unit 62 is configured to start the first timer when sending the request message to the internet of things terminal.
The second processing unit 62 is further configured to start a second timer if a confirmation message for the request message sent by the internet of things terminal is received within a first timing duration timed by the first timer; the confirmation message is used for indicating the terminal of the Internet of things to receive the request message;
and the detecting unit 63 is configured to detect a response message, which is sent by the terminal of the internet of things and is addressed to the request message, within a second timing duration timed by the second timer.
In other embodiments of the present invention, the second processing unit 62 is further configured to determine that the request operation is completed if a response message to the request message sent by the internet of things terminal is received within a second timing duration timed by the second timer.
In other embodiments of the present invention, the second processing unit 62 is further configured to determine to resend the request message to the terminal of the internet of things if the acknowledgment message is not received within a first timing duration timed by the first timer or the response message is not received within a second timing duration timed by the second timer.
In other embodiments of the present invention, the first timing duration and the second timing duration are determined according to a request method type. Preferably, the first timing duration is determined according to the current network patency degree; and determining the second timing duration according to the type of the request method and the processing speed of the terminal of the Internet of things.
Based on the hardware implementation of each unit in the internet of things terminal, in order to implement the data response processing method based on the internet of things provided in the embodiment of the present invention, an embodiment of the present invention further provides an internet of things terminal, as shown in fig. 7, where the internet of things terminal 70 includes: a first processor 71 and a first memory 72 configured to store computer programs capable of running on the processor,
wherein the first processor 71 is configured to perform the method steps of fig. 1 or fig. 3 when executing the computer program.
In addition, based on the hardware implementation of each unit in the internet of things platform, in order to implement the data response processing method based on the internet of things provided in the embodiment of the present invention, an embodiment of the present invention further provides an internet of things platform, as shown in fig. 8, where the internet of things platform 80 includes: a second processor 81 and a second memory 82 configured to store computer programs capable of running on the processor,
wherein the second processor 81 is configured to perform the method steps of fig. 2 or fig. 3 when running the computer program.
In an exemplary embodiment, the embodiment of the present invention further provides a computer readable storage medium, for example, the first memory 72 and the second memory 82 which comprise computer programs, which are executable by the first processor 71 of the internet of things terminal 70 or the second processor 81 of the internet of things platform 80, to complete the steps of the foregoing method. The computer-readable storage medium may be a magnetic random access Memory (FRAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM), among other memories.
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.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (21)

1. A data response processing method based on the Internet of things is characterized by comprising the following steps:
receiving a request message sent by an Internet of things platform; the request message is a message requiring the response of the terminal of the Internet of things;
sending a confirmation message and not sending a response message to the Internet of things platform based on the request message;
the confirmation message is used for indicating the terminal of the internet of things to receive the request message; the response message is used for carrying response data corresponding to the request message.
2. The method of claim 1, wherein the confirmation message is further used to indicate that a current response message is not ready for completion, requiring the platform of the internet of things to remain waiting for a response message.
3. The method of claim 2, wherein:
the confirmation message is an ACK message;
wherein, the function code in the ACK message is 2.06 code; the 2.06 code is used for representing that the request message is received, and the current response message is not ready to be completed, and the internet of things platform is required to keep waiting for the response message.
4. A data response processing method based on the Internet of things is characterized by comprising the following steps:
sending a request message to an Internet of things terminal, and starting a first timer; the request message is a message requiring the terminal of the Internet of things to respond;
if a confirmation message aiming at the request message sent by the terminal of the internet of things is received within a first timing duration timed by the first timer, starting a second timer; the confirmation message is used for indicating the terminal of the Internet of things to receive the request message;
and detecting a response message aiming at the request message sent by the terminal of the internet of things within a second timing duration timed by the second timer.
5. The method of claim 4, further comprising:
and if a response message aiming at the request message sent by the terminal of the internet of things is received within a second timing duration timed by the second timer, the request operation is completed.
6. The method of claim 4, further comprising:
and if the confirmation message is not received within the first timing duration timed by the first timer or the response message is not received within the second timing duration timed by the second timer, the request message is sent to the internet of things terminal again.
7. The method according to any one of claims 4 to 6, wherein:
and determining the first timing duration and the second timing duration according to the type of the request method.
8. The method of claim 7, wherein:
determining the first timing duration according to the current network smoothness degree;
and determining the second timing duration according to the type of the request method and the processing speed of the terminal of the Internet of things.
9. The utility model provides a thing networking terminal which characterized in that, thing networking terminal includes:
the receiving unit is used for receiving a request message sent by the Internet of things platform; the request message is a message requiring the terminal of the Internet of things to respond;
the first processing unit is used for sending a confirmation message to the Internet of things platform and not sending a response message based on the request message;
the confirmation message is used for indicating the terminal of the internet of things to receive the request message; the response message is used for carrying response data corresponding to the request message.
10. The utility model provides a thing networking terminal which characterized in that, thing networking terminal includes:
the first communication interface is used for receiving a request message sent by the Internet of things platform; the request message is a message requiring the terminal of the Internet of things to respond;
the first processor is used for sending a confirmation message and not sending a response message to the Internet of things platform based on the request message; the confirmation message is used for indicating that the Internet of things platform receives the request message; the response message is used for carrying response data corresponding to the request message.
11. The terminal of the internet of things of claim 10, wherein the confirmation message is further used to indicate that a current response message is not ready for completion and that the internet of things platform needs to remain waiting for a response message.
12. The internet of things terminal of claim 11, wherein:
the acknowledgement message is an ACK message,
wherein, the function code in the ACK message is 2.06 code; the 2.06 code is used for representing that the request message is received, and the current response message is not ready to be completed, and the internet of things platform is required to keep waiting for the response message.
13. An internet of things platform, comprising:
the sending unit is used for sending a request message to the terminal of the Internet of things; the request message is a message requiring the terminal of the Internet of things to respond;
the second processing unit is used for starting the first timer when sending the request message to the terminal of the Internet of things;
the second processing unit is further configured to start a second timer if a confirmation message for the request message sent by the internet of things terminal is received within a first timing duration timed by the first timer; the confirmation message is used for indicating the terminal of the Internet of things to receive the request message;
and the detection unit is used for detecting a response message aiming at the request message sent by the terminal of the internet of things within a second timing duration timed by the second timer.
14. An internet of things platform, comprising:
the second communication interface is used for sending a request message to the terminal of the Internet of things; the request message is a message requiring the terminal of the Internet of things to respond;
the second processor is used for starting the first timer when sending the request message to the terminal of the Internet of things; the second timer is further used for starting the second timer if a confirmation message aiming at the request message sent by the terminal of the internet of things is received within a first timing duration timed by the first timer; the confirmation message is used for indicating the terminal of the Internet of things to receive the request message; and the response message aiming at the request message sent by the terminal of the internet of things is detected within a second timing duration timed by the second timer.
15. The internet of things platform of claim 14, wherein the second processor is configured to complete the request operation if a response message to the request message sent by the internet of things terminal is received within a second timing duration timed by the second timer.
16. The internet of things platform of claim 14, wherein the second communication interface is configured to resend the request message to the internet of things terminal if the acknowledgment message is not received within a first timing duration timed by the first timer or the response message is not received within a second timing duration timed by the second timer.
17. The Internet of things platform of claims 14-16, wherein the first timing duration and the second timing duration are determined according to a request method type.
18. The internet of things platform of claim 17, wherein the first timing duration is determined according to a current network patency level; and determining the second timing duration according to the type of the request method and the processing speed of the terminal of the Internet of things.
19. An internet of things terminal, the internet of things terminal comprising: a first processor and a first memory configured to store a computer program capable of running on the processor,
wherein the first processor is configured to perform the steps of the method of any one of claims 1 to 3 when running the computer program.
20. An internet of things platform, comprising: a second processor and a second memory configured to store a computer program capable of running on the processor,
wherein the second processor is configured to perform the steps of the method of any of claims 4 to 8 when running the computer program.
21. A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of the internet of things based data response processing method of any one of claims 1 to 3 or 4 to 8.
CN201811027689.1A 2018-09-04 2018-09-04 Data response processing method and equipment based on Internet of things and storage medium Pending CN110875952A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811027689.1A CN110875952A (en) 2018-09-04 2018-09-04 Data response processing method and equipment based on Internet of things and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811027689.1A CN110875952A (en) 2018-09-04 2018-09-04 Data response processing method and equipment based on Internet of things and storage medium

Publications (1)

Publication Number Publication Date
CN110875952A true CN110875952A (en) 2020-03-10

Family

ID=69716117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811027689.1A Pending CN110875952A (en) 2018-09-04 2018-09-04 Data response processing method and equipment based on Internet of things and storage medium

Country Status (1)

Country Link
CN (1) CN110875952A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112165352A (en) * 2020-09-24 2021-01-01 天宸星通(深圳)科技有限公司 Satellite Internet of things terminal and data interaction method thereof
CN112367387A (en) * 2020-10-30 2021-02-12 湖北亿咖通科技有限公司 Internet of vehicles communication method and system
CN114598997A (en) * 2020-12-04 2022-06-07 中国电信股份有限公司 Method, system, server and terminal for realizing multicast of narrowband Internet of things

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198190A1 (en) * 2003-12-31 2005-09-08 Arthur Zavalkovsky Dynamic timeout in a client-server system
CN102648612A (en) * 2009-09-30 2012-08-22 意法爱立信有限公司 Method and system for managing a connection in a connection oriented in-order delivery environment
CN106034141A (en) * 2015-03-12 2016-10-19 华为技术有限公司 Message processing method, resource obtaining method, server and terminal device
CN107071826A (en) * 2011-03-17 2017-08-18 华为技术有限公司 The method and apparatus of transmitting data resources

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198190A1 (en) * 2003-12-31 2005-09-08 Arthur Zavalkovsky Dynamic timeout in a client-server system
CN102648612A (en) * 2009-09-30 2012-08-22 意法爱立信有限公司 Method and system for managing a connection in a connection oriented in-order delivery environment
CN107071826A (en) * 2011-03-17 2017-08-18 华为技术有限公司 The method and apparatus of transmitting data resources
CN106034141A (en) * 2015-03-12 2016-10-19 华为技术有限公司 Message processing method, resource obtaining method, server and terminal device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112165352A (en) * 2020-09-24 2021-01-01 天宸星通(深圳)科技有限公司 Satellite Internet of things terminal and data interaction method thereof
CN112165352B (en) * 2020-09-24 2021-04-16 天宸星通(深圳)科技有限公司 Interaction method for satellite Internet of things terminal
CN112367387A (en) * 2020-10-30 2021-02-12 湖北亿咖通科技有限公司 Internet of vehicles communication method and system
CN114598997A (en) * 2020-12-04 2022-06-07 中国电信股份有限公司 Method, system, server and terminal for realizing multicast of narrowband Internet of things

Similar Documents

Publication Publication Date Title
CN107087033B (en) Message pushing method and device, storage medium and computer equipment
CN110875952A (en) Data response processing method and equipment based on Internet of things and storage medium
CN108712485B (en) Resource subscription method and device for Internet of things equipment
CN102045772B (en) Data transmission method and device
CN102685203A (en) Method and equipment for data resource transmission
CN107567107B (en) Data transmission method and device
RU2004109133A (en) IMPROVEMENT OF ACCESSIBILITY AND SCALABILITY IN THE MESSAGE TRANSFER SYSTEM BY THE METHOD TRANSPARENT FOR THE APPLICATION
CN107360177B (en) A kind of message transmitting method and device based on UDP
CN110944064B (en) Remote access control system, method, device and medium for embedded network
CN116112536A (en) TCP-serial port communication transparent transmission method and device
CN110827971A (en) Medical logistics intelligent management system
CN112637370B (en) Data processing method, device, equipment and storage medium
CN110809046B (en) Equipment network distribution method and device, electronic equipment and storage medium
CN115348333A (en) Data transmission method, system and equipment based on UDP (user Datagram protocol) double-end communication interaction
CN112261512B (en) Master station remote control method, device, storage medium and equipment of unbalanced polling protocol
CN113965447B (en) Online cloud diagnosis method, device, system, equipment and storage medium
WO2017107083A1 (en) Data sending method and receiving method, apparatus and system
CN111586841A (en) Terminal paging optimization method, system, device and readable storage medium
CN108365923B (en) Data transmission method and wireless terminal equipment
CN107911416A (en) A kind of Boa server improved methods based on embedded system
JP2013239908A (en) Communication system, terminal, relay device, communication method, and computer program
CN115460648B (en) Wireless link failure detection method, device, equipment and storage medium
CN115988110A (en) Inter-chip communication method and storage medium
CN112511276B (en) Data processing method and device
CN111756834B (en) Code scanning delay processing 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200310