Instruction issuing method and device, electronic equipment and storage medium

By monitoring the response time of target devices in the IoT platform in real time, determining the network status level and adjusting the instruction transmission strategy, the problem of low transmission efficiency in traditional MQTT systems during network congestion is solved, and more efficient instruction transmission is achieved.

CN119520563AActive Publication Date: 2025-02-25GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411624309.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-25
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

The traditional MQTT data transmission system cannot flexibly adjust according to the real-time network status, resulting in an increase in the transmission delay of instructions during network congestion, making the transmission efficiency of instructions very low.

Method used

By monitoring the real-time response time of the target device in the Internet of Things platform in real time, determining the target network status level, and determining the target instruction issuance strategy based on this level, adjusting the transmission rate of the instruction.

Benefits of technology

Dynamically adjust the transmission rate of instructions, reduce the data transmission pressure during network congestion, and improve the efficiency of transmission instructions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520563A_ABST
    Figure CN119520563A_ABST
Patent Text Reader

Abstract

The invention provides an instruction issuing method and device, electronic equipment and a storage medium, and the method comprises the steps: monitoring the real-time response time of equipment for an instruction of a target instruction type in real time for the equipment of a target equipment type in an Internet of Things platform; determining a target network state level corresponding to the instruction of the target instruction type based on the real-time response time; a target instruction issuing strategy corresponding to the instruction of the target instruction type is determined based on the target network state level, and the instruction issuing strategy is used for adjusting the transmission rate of the instruction of the target instruction type; and issuing the instruction of the target instruction type according to the target instruction issuing strategy. Through the instruction transmission method and device, the instruction transmission rate can be dynamically adjusted according to the real-time network state of the Internet of Things platform, so that the data transmission pressure can be reduced when the network is congested, and the instruction transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to a method, device, electronic device and storage medium for issuing instructions. Background Art

[0002] With the widespread application of IoT technology, MQTT (Message Queuing Telemetry Transport), as a lightweight message transmission protocol, plays an important role in inter-device communication. In practical applications, for scenarios where IoT platforms send instructions to smart devices, MQTT data transmission systems mostly use a fixed transmission frequency to transmit these instructions issued by IoT platforms.

[0003] However, the complexity and instability of the network environment often affect the transmission efficiency of MQTT for instructions. The traditional MQTT data transmission system cannot be flexibly adjusted according to the real-time network status, resulting in increased transmission delays for instructions when the network is congested, making the transmission efficiency of instructions very low. Summary of the invention

[0004] The present application provides a method, device, electronic device and storage medium for issuing instructions to solve the problem that the traditional MQTT data transmission system in the prior art cannot be flexibly adjusted according to the real-time network status, resulting in increased transmission delay of instructions when the network is congested, making the transmission efficiency of instructions very low.

[0005] In a first aspect, the present application provides a method for issuing instructions, comprising:

[0006] For a device of a target device type in the Internet of Things platform, real-time monitoring of the real-time response time of the device to an instruction of a target instruction type;

[0007] Determine a target network status level corresponding to the instruction of the target instruction type based on the real-time response time;

[0008] Determine a target instruction issuing strategy corresponding to the instruction of the target instruction type based on the target network status level, wherein the instruction issuing strategy is used to adjust the transmission rate of the instruction of the target instruction type;

[0009] Instructions of the target instruction type are issued according to the target instruction issuance strategy.

[0010] In a possible implementation, the real-time monitoring of the real-time response time of the device to an instruction of the target instruction type includes:

[0011] At every preset time interval, obtaining a first response time of the device to each instruction of the target instruction type within a current time period;

[0012] Performing a summing and averaging operation on the first response times of all the instructions to obtain a corresponding first response time mean;

[0013] The first response time mean is determined as the real-time response time.

[0014] In a possible implementation, determining the target network status level corresponding to the instruction of the target instruction type based on the real-time response time includes:

[0015] Obtaining at least one preset network status level;

[0016] Determine a response time range corresponding to each of the network status levels;

[0017] Determine the response time range where the real-time response time is located as the target time range;

[0018] The network status level corresponding to the target time range is determined as the target network status level corresponding to the instruction of the target instruction type.

[0019] In a possible implementation manner, determining the response time range corresponding to each of the network status levels includes:

[0020] Acquire a second response time of the device to each instruction of the target instruction type within a historical time period, wherein the historical time period is before the current time period;

[0021] Performing a summing and averaging operation on the second response times of all the instructions to obtain a corresponding second response time mean;

[0022] Determine the instructions corresponding to the second response time greater than the second response time mean as peak time period instructions, and determine the instructions corresponding to the second response time less than or equal to the second response time mean as normal time period instructions;

[0023] Performing a summing and averaging operation on the second response times of all the peak time period instructions to obtain a corresponding peak time period average response time, and performing a summing and averaging operation on the second response times of all the normal time period instructions to obtain a corresponding normal time period average response time;

[0024] Obtaining a preset time threshold, wherein the time threshold is less than the average response time in the normal time period;

[0025] A response time range corresponding to each network status level is constructed based on the time threshold, the average response time in the normal time period, and the average response time in the peak time period.

[0026] In a possible implementation manner, after issuing the instruction of the target instruction type according to the target instruction issuing strategy, the method further includes:

[0027] Monitoring data transmission performance indicators of the IoT platform;

[0028] When the data transmission performance index meets the preset index condition, the response time range corresponding to each network status level is kept unchanged;

[0029] When the data transmission performance indicator does not meet the preset indicator condition, the upper limit and the lower limit of the response time range corresponding to each network status level are lowered.

[0030] In a possible implementation, the determining, based on the target network status level, a target instruction issuing strategy corresponding to an instruction of the target instruction type includes:

[0031] When the target network status level is low latency, determining the current instruction issuing strategy corresponding to the instruction of the target instruction type as the target instruction issuing strategy;

[0032] When the target network status level is medium delay, a discrete issuance strategy is determined as the target instruction issuance strategy, wherein the discrete issuance strategy is used to issue multiple instructions issued at one time in batches;

[0033] When the target network status level is high delay, a delayed discrete issuance strategy is determined as a target instruction issuance strategy, wherein the delayed discrete issuance strategy is used to issue multiple instructions issued at one time in batches after a delay of a period of time.

[0034] In a possible implementation manner, before issuing the instruction of the target instruction type according to the target instruction issuing strategy, the method further includes:

[0035] When the target network status level is low latency, the service quality parameter used to issue the instruction is adjusted to a first value, wherein when the instruction is issued according to the first value, the uniqueness of the instruction is ensured through a four-way handshake mechanism until confirmation;

[0036] When the target network status level is medium delay, adjusting the service quality parameter used to send the instruction to a second value, wherein when sending the instruction according to the second value, the instruction will be resent until confirmation;

[0037] When the target network status level is high delay, the service quality parameter used to send the instruction is adjusted to a third value, wherein the instruction is sent according to the third value without confirmation or retransmission.

[0038] In a second aspect, the present application provides an instruction issuing device, comprising:

[0039] A time monitoring module, for monitoring the real-time response time of a device of a target device type in the IoT platform to an instruction of a target instruction type;

[0040] A level determination module, configured to determine a target network status level corresponding to an instruction of the target instruction type based on the real-time response time;

[0041] A strategy determination module, used to determine a target instruction issuing strategy corresponding to the instruction of the target instruction type based on the target network status level, wherein the instruction issuing strategy is used to adjust the transmission rate of the instruction of the target instruction type;

[0042] An instruction issuing module is used to issue instructions of the target instruction type according to the target instruction issuing strategy.

[0043] In a possible implementation, the time monitoring module is specifically used to:

[0044] At every preset time interval, obtaining a first response time of the device to each instruction of the target instruction type within a current time period;

[0045] Performing a summing and averaging operation on the first response times of all the instructions to obtain a corresponding first response time mean;

[0046] The first response time mean is determined as the real-time response time.

[0047] In a possible implementation manner, the level determination module is specifically configured to:

[0048] Obtaining at least one preset network status level;

[0049] Determine a response time range corresponding to each of the network status levels;

[0050] Determine the response time range where the real-time response time is located as the target time range;

[0051] The network status level corresponding to the target time range is determined as the target network status level corresponding to the instruction of the target instruction type.

[0052] In a possible implementation manner, the level determination module is further configured to:

[0053] Acquire a second response time of the device to each instruction of the target instruction type within a historical time period, wherein the historical time period is before the current time period;

[0054] Performing a summing and averaging operation on the second response times of all the instructions to obtain a corresponding second response time mean;

[0055] Determine the instructions corresponding to the second response time greater than the second response time mean as peak time period instructions, and determine the instructions corresponding to the second response time less than or equal to the second response time mean as normal time period instructions;

[0056] Performing a summing and averaging operation on the second response times of all the peak time period instructions to obtain a corresponding peak time period average response time, and performing a summing and averaging operation on the second response times of all the normal time period instructions to obtain a corresponding normal time period average response time;

[0057] Obtaining a preset time threshold, wherein the time threshold is less than the average response time in the normal time period;

[0058] A response time range corresponding to each network status level is constructed based on the time threshold, the average response time in the normal time period, and the average response time in the peak time period.

[0059] In a possible implementation, the device further includes an indicator monitoring module, which is used to:

[0060] Monitoring data transmission performance indicators of the IoT platform;

[0061] When the data transmission performance index meets the preset index condition, the response time range corresponding to each network status level is kept unchanged;

[0062] When the data transmission performance indicator does not meet the preset indicator condition, the upper limit and the lower limit of the response time range corresponding to each network status level are lowered.

[0063] In a possible implementation manner, the strategy determination module is specifically configured to:

[0064] When the target network status level is low latency, determining the current instruction issuing strategy corresponding to the instruction of the target instruction type as the target instruction issuing strategy;

[0065] When the target network status level is medium delay, a discrete issuance strategy is determined as the target instruction issuance strategy, wherein the discrete issuance strategy is used to issue multiple instructions issued at one time in batches;

[0066] When the target network status level is high delay, a delayed discrete issuance strategy is determined as a target instruction issuance strategy, wherein the delayed discrete issuance strategy is used to issue multiple instructions issued at one time in batches after a delay of a period of time.

[0067] In a possible implementation, the device further includes a parameter adjustment module, configured to:

[0068] When the target network status level is low latency, the service quality parameter used to issue the instruction is adjusted to a first value, wherein when the instruction is issued according to the first value, the uniqueness of the instruction is ensured through a four-way handshake mechanism until confirmation;

[0069] When the target network status level is medium delay, adjusting the service quality parameter used to send the instruction to a second value, wherein when sending the instruction according to the second value, the instruction will be resent until confirmation;

[0070] When the target network status level is high delay, the service quality parameter used to send the instruction is adjusted to a third value, wherein the instruction is sent according to the third value without confirmation or retransmission.

[0071] In a third aspect, the present application provides a device, comprising: a processor and a memory, wherein the processor is used to execute an instruction issuing program stored in the memory to implement the instruction issuing method described in any one of the first aspects.

[0072] In a fourth aspect, the present application provides a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the instruction issuing method described in any one of the first aspects.

[0073] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, for the device of the target device type in the Internet of Things platform, monitors the real-time response time of the device to the instruction of the target instruction type in real time, and then determines the target network status level corresponding to the instruction of the target instruction type based on the real-time response time, and determines the target instruction issuance strategy corresponding to the instruction of the target instruction type based on the target network status level, wherein the instruction issuance strategy is used to adjust the transmission rate of the instruction of the target instruction type, and finally, the instruction of the target instruction type is issued according to the target instruction issuance strategy. Through the present application, the transmission rate of the instruction can be dynamically adjusted according to the real-time network status of the Internet of Things platform, thereby reducing the pressure of data transmission when the network is congested and improving the efficiency of transmitting instructions. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0075] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0076] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0077] Figure 1 A flowchart of an embodiment of a method for issuing instructions provided in an embodiment of the present application;

[0078] Figure 2 An overall service flow chart for issuing instructions provided in an embodiment of the present application;

[0079] Figure 3 A flow chart of an embodiment of the present application for real-time monitoring of the real-time response time of the device to an instruction of a target instruction type;

[0080] Figure 4 A flowchart of an embodiment of the present application for determining a target network status level corresponding to an instruction of the target instruction type based on the real-time response time;

[0081] Figure 5 A block diagram of an embodiment of a device for issuing instructions provided in an embodiment of the present application;

[0082] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0084] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0085] In order to solve the technical problem in the prior art that the traditional MQTT data transmission system cannot be flexibly adjusted according to the real-time network status, resulting in increased transmission delay of instructions when the network is congested, making the transmission efficiency of instructions very low, the present application provides a method for issuing instructions, which can dynamically adjust the transmission rate of instructions according to the real-time network status of the Internet of Things platform, thereby reducing the pressure of data transmission when the network is congested and improving the efficiency of transmitting instructions.

[0086] Figure 1 A flowchart of an embodiment of a method for issuing instructions provided in an embodiment of the present application.

[0087] like Figure 1 As shown, the method comprises the following steps:

[0088] Step 101: For a device of a target device type in an Internet of Things platform, monitor in real time the real-time response time of the device to an instruction of a target instruction type.

[0089] An instruction issuing method provided in an embodiment of the present application is used to allocate an MQTT (Message Queuing Telemetry Transport) proxy service instruction issuing strategy by monitoring the network status, and then issuing instructions according to the strategy.

[0090] The IoT platform mentioned above includes various types of smart devices, such as refrigerators, TVs, washing machines, smart lights, air conditioners, etc. In actual applications, the IoT platform will issue various types of instructions to each smart device, such as data transfer instructions: used to transfer data between memory and registers; arithmetic operation instructions: used to perform arithmetic operations such as addition, subtraction, multiplication, and division; logical operation and shift instructions: used to perform logical operations and shift operations; string operation instructions: used to process string operations; control transfer instructions: used to change the execution flow of the program; processor control instructions: used to control the operation of the processor, etc.

[0091] The target device type can be any device type included in the IoT platform, and can be specified by the user in actual applications; or each device type included in the IoT platform can be used as the target device type to achieve monitoring of each type of device.

[0092] The target instruction type can be any instruction type, which can be specified by the user in actual applications; or each instruction type included in the IoT platform can be used as the target instruction type, so as to monitor the issuance of each type of instruction.

[0093] Real-time response time refers to the response time of the target device type when the IoT platform sends a target instruction type instruction to the target device type through the MQTT proxy service, that is, the difference between the time when the MQTT proxy service sends the instruction to the target device type and the time when the target device type reports the instruction reception to the MQTT proxy service.

[0094] As for how to monitor the real-time response time of the device to the instructions of the target instruction type in real time, it will be explained in detail through the embodiments below and will not be described in detail here.

[0095] Step 102: Determine a target network status level corresponding to an instruction of the target instruction type based on the real-time response time.

[0096] The target network status level includes low latency, medium latency and high latency. Low latency means that the server is in the best performance state, medium latency means that the current network is slightly congested, and high latency means that the current network is severely congested.

[0097] In an embodiment of the present application, the current target network status level can be determined by the real-time response time of the device of the target device type to the instruction of the target instruction type, thereby understanding the current network status, thereby facilitating the subsequent adjustment of the instruction transmission strategy according to the network status.

[0098] As for how to determine the target network status level corresponding to the instruction of the target instruction type based on the real-time response time, it will be described in detail through the embodiments below and will not be described in detail here.

[0099] Step 103: Determine a target instruction issuing strategy corresponding to instructions of the target instruction type based on the target network status level, wherein the instruction issuing strategy is used to adjust a transmission rate of instructions of the target instruction type.

[0100] Step 104: Issue instructions of the target instruction type according to the target instruction issuance strategy.

[0101] For ease of understanding, step 103 and step 104 are described in a unified manner as follows:

[0102] The target instruction delivery strategy is used to adjust the transmission rate of instructions of the target instruction type, including delivery strategies for low latency, delivery strategies for medium latency, and delivery strategies for high latency.

[0103] Specifically, step 103 may include the following steps:

[0104] Step A1: when the target network status level is low latency, determine the current instruction issuing strategy corresponding to the instruction of the target instruction type as the target instruction issuing strategy;

[0105] Step A2: when the target network status level is medium delay, determining a discrete issuance strategy as the target instruction issuance strategy, wherein the discrete issuance strategy is used to issue multiple instructions issued at one time in batches;

[0106] Step A3: when the target network status level is high delay, the delayed discrete delivery strategy is determined as the target instruction delivery strategy, wherein the delayed discrete delivery strategy is used to deliver multiple instructions that are delivered at one time in batches after a delay of a period of time.

[0107] From the above description, it can be seen that in this implementation, when the target network status level is low latency, it means that the server is in the optimal performance state. At this time, there is no need to adjust the transmission rate of instructions of the target instruction type. Therefore, the current instruction issuance strategy is kept unchanged, and instructions of the target instruction type continue to be issued according to the current instruction issuance strategy.

[0108] When the target network status level is medium delay, it means that there is slight congestion in the current network. All instructions of the target instruction type are issued in a discrete manner through the discrete issuance strategy. A large number of instructions that were originally issued at one time are issued in batches after being discretized, thereby shortening the device response time and allowing users to experience smooth services during peak hours.

[0109] When the target network status level is high latency, it means that the current network is severely congested. In this case, a delayed discrete delivery strategy is adopted to delay the delivery of all instructions of the target instruction type. On the basis of delayed delivery, all instructions are delivered discretely, which can effectively alleviate bandwidth pressure, shorten device response time, and ensure the service integrity experience for users even during peak hours.

[0110] Furthermore, the time for delaying the issuance of the instruction may be determined according to the length of the real-time response time, that is, the longer the real-time response time is, the longer the time for delaying the issuance of the instruction is.

[0111] In the application, when the target network status level is higher than high latency, the user can be notified by sending an alarm message so that the user can handle it in time to ensure the normal operation of the platform.

[0112] In addition, step 104 may further include the following steps:

[0113] Step B1: when the target network status level is low latency, adjusting the service quality parameter used to issue instructions to a first value, wherein when issuing instructions according to the first value, a four-way handshake mechanism is used to ensure the uniqueness of the instructions until confirmation;

[0114] Step B2: when the target network status level is medium delay, adjusting the service quality parameter used to send the instruction to a second value, wherein when sending the instruction according to the second value, the instruction will be resent until confirmed;

[0115] Step B3: When the target network status level is high delay, the service quality parameter used to send instructions is adjusted to a third value, wherein the instructions are sent according to the third value without confirmation or retransmission.

[0116] In the application, MQTT provides a QoS mechanism. Its core is to design a variety of message interaction mechanisms to provide different service qualities to meet the user's requirements for message reliability in various scenarios. MQTT defines three QoS levels, namely: QoS 0 (the third value), delivered at most once, no confirmation or retransmission after sending; QoS1 (the second value), delivered at least once, the message will be retransmitted until confirmed; QoS2 (the first value), delivered only once, and the uniqueness of the message is ensured through the four-way handshake mechanism until confirmation. Among them, using QoS 0 may lose messages, using QoS1 can ensure that messages are received, but messages may be repeated, and using QoS2 can ensure that messages are neither lost nor repeated. QoS levels from low to high not only mean the improvement of message reliability, but also the increase of transmission complexity.

[0117] In this implementation, the service quality of the MQTT proxy service can be set according to the target network status level, that is, the higher the delay, the lower the corresponding service quality level. In this way, the transmission frequency can be automatically reduced when the network is congested, thereby reducing the pressure of data transmission and avoiding delays and packet loss caused by network congestion. When the network is idle, the transmission frequency is increased to make full use of available bandwidth resources, thereby improving the transmission service quality of instructions.

[0118] For ease of understanding, Figure 2 The overall service flow chart of the instruction issuance shown provides a unified description of steps 101 to 104:

[0119] like Figure 2As shown, the MQTT proxy service records the time when the IoT platform sends the target type of instruction to the device, as well as the instruction reception time reported by the device, and reports the recorded data to the network monitoring service. After the network monitoring service collects these data, it calculates the real-time response time of the device to the instruction, and then obtains the network status through the real-time response time, and determines the instruction issuance strategy through the network status. Finally, the instruction issuance strategy is fed back to the MQTT proxy service, and the MQTT proxy service issues the corresponding type of instruction according to the instruction issuance strategy. The device executes the instruction after receiving it. This completes the instruction issuance process.

[0120] The technical solution provided in the embodiment of the present application is to monitor the real-time response time of the device to the target instruction type of the device in the Internet of Things platform in real time, and then determine the target network status level corresponding to the instruction of the target instruction type based on the real-time response time, and determine the target instruction issuance strategy corresponding to the instruction of the target instruction type based on the target network status level, wherein the instruction issuance strategy is used to adjust the transmission rate of the instruction of the target instruction type, and finally, issue the instruction of the target instruction type according to the target instruction issuance strategy. Through this application, the transmission rate of the instruction can be dynamically adjusted according to the real-time network status of the Internet of Things platform, thereby reducing the pressure of data transmission when the network is congested and improving the efficiency of transmitting instructions.

[0121] Figure 3 A flow chart of an embodiment of the present application for real-time monitoring of the real-time response time of the device to instructions of a target instruction type. Figure 3 The process shown in Figure 1 Based on the process shown, the following steps are included:

[0122] Step 301: Obtain, at every preset time interval, the first response time of the device to each instruction of the target instruction type within the current time period;

[0123] Step 302: performing a summing and averaging operation on the first response times of all the instructions to obtain a corresponding first response time mean value;

[0124] Step 303: Determine the first response time mean as the real-time response time.

[0125] For ease of understanding, steps 301 to 303 are described in a unified manner as follows:

[0126] In the embodiment of the present application, at every preset time interval (such as one minute, five minutes or ten minutes, etc.), the average response time of all instructions of the target instruction type issued by the IoT platform to the device of the target device type in the current time period is summed and averaged to obtain the average response time of all devices of the target device type to all instructions of the target instruction type (i.e., the first response time mean), and then the first response time mean is determined as the real-time response time. In this way, the influence of individual data can be eliminated, making the calculation result more accurate.

[0127] Figure 4 A flowchart of an embodiment of the present application is provided for determining a target network status level corresponding to an instruction of the target instruction type based on the real-time response time. Figure 4 The process shown in Figure 1 Based on the process shown, the following steps are included:

[0128] Step 401: Obtain at least one preset network status level.

[0129] Step 402: Determine the response time range corresponding to each of the network status levels.

[0130] Step 403: determine the response time range in which the real-time response time is located as the target time range.

[0131] Step 404: Determine the network status level corresponding to the target time range as the target network status level corresponding to the instruction of the target instruction type.

[0132] For ease of understanding, steps 401 to 404 are described in a unified manner as follows:

[0133] Network status level, used to characterize network status, including: low latency, medium latency, and high latency.

[0134] The response time range is a time interval used to determine the corresponding network status level according to the response time.

[0135] Specifically, step 402 includes:

[0136] Step C1, obtaining a second response time of the device to each instruction of the target instruction type within a historical time period, wherein the historical time period is before the current time period;

[0137] Step C2, performing a summing and averaging operation on the second response times of all the instructions to obtain a corresponding second response time mean value;

[0138] Step C3: Determine the instructions corresponding to the second response time greater than the average value of the second response time as peak period instructions, and determine the instructions corresponding to the second response time less than or equal to the average value of the second response time as normal period instructions;

[0139] Step C4: Perform a summation average operation on the second response times of all the peak period instructions to obtain the corresponding average response time for the peak period, and perform a summation average operation on the second response times of all the normal period instructions to obtain the corresponding average response time for the normal period;

[0140] Step C5: Obtain a preset time threshold, where the time threshold is less than the average response time for the normal period;

[0141] Step C6: Based on the time threshold, the average response time for the normal period, and the average response time for the peak period, construct a response time range corresponding to each network state level.

[0142] The historical period is the period before the current period. For example, the previous month, the previous week, the previous day, etc.

[0143] In this embodiment, first calculate the average value of the response times of the devices of the target device type to the instructions of the target instruction type within the historical period. Then, by comparing this average value with the response time of each device to each instruction, obtain the peak period instructions corresponding to the second response time greater than the average value of the second response time, and the normal period instructions corresponding to the second response time less than or equal to the average value of the second response time. Finally, obtain the average response time for the peak period (HRT) by performing a summation average calculation on the response times corresponding to the peak period instructions, and obtain the average response time for the normal period (NRT) by performing a summation average calculation on the response times corresponding to the normal period instructions.

[0144] Furthermore, construct the corresponding response time range according to HRT and NRT. Specifically, determine a time threshold less than NRT, and divide three time ranges with the time threshold, NRT, and HRT. Thus, obtain the response time range corresponding to each network state level.

[0145] Finally, determine the network state level corresponding to the response time range where the real-time response time is located as the target network state level.

[0146] For example, if the time threshold is 500 (milliseconds) and the real-time response time is T, the response time range may include: 1 (millisecond) < T < 500 (milliseconds), which is low latency; 500 (milliseconds) <= T < NRT, which is medium latency; NRT <= T <= HRT, which is high latency.

[0147] Figure 4 The process shown here constructs the response time range corresponding to each network status level through the average response time (HRT) during the peak time period and the response time (NRT) during the normal time period in the historical time period, and then determines the target network status level corresponding to the real-time response time based on the response time range. In this way, the response time of the device to the command in the historical time period can be used as a reference to determine the network status in the current time period without manual judgment, which improves the efficiency and accuracy of the judgment.

[0148] In addition, in another embodiment, after step 104, the following steps may also be included:

[0149] Step D1, monitoring the data transmission performance indicators of the Internet of Things platform;

[0150] Step D2: When the data transmission performance index meets the preset index condition, the response time range corresponding to each network status level is kept unchanged;

[0151] Step D3: When the data transmission performance indicator does not meet the preset indicator condition, lower the upper limit and the lower limit of the response time range corresponding to each network status level.

[0152] Data transmission performance indicators are used to characterize the data transmission performance of the IoT platform.

[0153] Preset indicator conditions are used to characterize whether the data transmission performance of the IoT platform meets user expectations.

[0154] In the embodiment of the present application, when the data transmission performance indicator meets the preset indicator conditions, it means that the data transmission performance of the current Internet of Things platform meets the user's expectations, and the response time range corresponding to each network status level can be kept unchanged, and the instruction issuance strategy can continue to be determined according to the currently divided response time range; and when the data transmission performance indicator does not meet the preset indicator conditions, it means that the data transmission performance of the current Internet of Things platform does not meet the user's expectations. At this time, the upper and lower limits of the response time range corresponding to each network status level are lowered to further improve the system adaptability and performance.

[0155] For example, the current response time range includes: 1 millisecond < T < 500 milliseconds for low latency; 500 milliseconds <= T < NRT (600 milliseconds) for medium latency; NRT (600 milliseconds) <= T <= HRT (700 milliseconds) for high latency. In the case where the data transmission performance index does not meet the preset index conditions, it can be modified to: 1 millisecond < T < 300 milliseconds for low latency; 300 milliseconds <= T < NRT (400 milliseconds) for medium latency; NRT (400 milliseconds) <= T <= HRT (500 milliseconds) for high latency. In this way, the system adaptability and performance can be further improved.

[0156] Figure 5 The block diagram of an embodiment of an instruction issuing device provided by an embodiment of the present application. As Figure 5 shown, the device includes:

[0157] A time monitoring module 51, configured to, for devices of a target device type in an Internet of Things platform, monitor in real time the real-time response time of the devices to instructions of a target instruction type;

[0158] A level determination module 52, configured to determine a target network state level corresponding to the instructions of the target instruction type based on the real-time response time;

[0159] A policy determination module 53, configured to determine a target instruction issuing policy corresponding to the instructions of the target instruction type based on the target network state level, where the instruction issuing policy is used to adjust the transmission rate of the instructions of the target instruction type;

[0160] An instruction issuing module 54, configured to issue the instructions of the target instruction type according to the target instruction issuing policy.

[0161] In a possible implementation manner, the time monitoring module is specifically configured to:

[0162] At each preset time interval, obtain the first response time of each instruction of the target instruction type for the device within the current time period;

[0163] Perform a summation average operation on the first response times of all the instructions to obtain a corresponding first response time average value;

[0164] Determine the first response time average value as the real-time response time.

[0165] In a possible implementation manner, the level determination module is specifically configured to:

[0166] Obtain at least one preset network state level;

[0167] Determine the response time range corresponding to each network state level;

[0168] Determine the response time range where the real-time response time is located as the target time range;

[0169] The network status level corresponding to the target time range is determined as the target network status level corresponding to the instruction of the target instruction type.

[0170] In a possible implementation manner, the level determination module is further configured to:

[0171] Acquire a second response time of the device to each instruction of the target instruction type within a historical time period, wherein the historical time period is before the current time period;

[0172] Performing a summing and averaging operation on the second response times of all the instructions to obtain a corresponding second response time mean;

[0173] Determine the instructions corresponding to the second response time greater than the second response time mean as peak time period instructions, and determine the instructions corresponding to the second response time less than or equal to the second response time mean as normal time period instructions;

[0174] Performing a summing and averaging operation on the second response times of all the peak time period instructions to obtain a corresponding peak time period average response time, and performing a summing and averaging operation on the second response times of all the normal time period instructions to obtain a corresponding normal time period average response time;

[0175] Obtaining a preset time threshold, wherein the time threshold is less than the average response time in the normal time period;

[0176] A response time range corresponding to each network status level is constructed based on the time threshold, the average response time in the normal time period, and the average response time in the peak time period.

[0177] In a possible implementation, the device further includes an indicator monitoring module, which is used to:

[0178] Monitoring data transmission performance indicators of the IoT platform;

[0179] When the data transmission performance index meets the preset index condition, the response time range corresponding to each network status level is kept unchanged;

[0180] When the data transmission performance indicator does not meet the preset indicator condition, the upper limit and the lower limit of the response time range corresponding to each network status level are lowered.

[0181] In a possible implementation manner, the strategy determination module is specifically configured to:

[0182] When the target network status level is low latency, determining the current instruction issuing strategy corresponding to the instruction of the target instruction type as the target instruction issuing strategy;

[0183] When the target network status level is medium delay, a discrete issuance strategy is determined as the target instruction issuance strategy, wherein the discrete issuance strategy is used to issue multiple instructions issued at one time in batches;

[0184] When the target network status level is high delay, a delayed discrete issuance strategy is determined as a target instruction issuance strategy, wherein the delayed discrete issuance strategy is used to issue multiple instructions issued at one time in batches after a delay of a period of time.

[0185] In a possible implementation, the device further includes a parameter adjustment module, configured to:

[0186] When the target network status level is low latency, the service quality parameter used to issue the instruction is adjusted to a first value, wherein when the instruction is issued according to the first value, the uniqueness of the instruction is ensured through a four-way handshake mechanism until confirmation;

[0187] When the target network status level is medium delay, adjusting the service quality parameter used to send the instruction to a second value, wherein when sending the instruction according to the second value, the instruction will be resent until confirmation;

[0188] When the target network status level is high delay, the service quality parameter used to send the instruction is adjusted to a third value, wherein the instruction is sent according to the third value without confirmation or retransmission.

[0189] The technical solution provided in the embodiment of the present application is to monitor the real-time response time of the device to the target instruction type of the device in the Internet of Things platform in real time, and then determine the target network status level corresponding to the instruction of the target instruction type based on the real-time response time, and determine the target instruction issuance strategy corresponding to the instruction of the target instruction type based on the target network status level, wherein the instruction issuance strategy is used to adjust the transmission rate of the instruction of the target instruction type, and finally, issue the instruction of the target instruction type according to the target instruction issuance strategy. Through this application, the transmission rate of the instruction can be dynamically adjusted according to the real-time network status of the Internet of Things platform, thereby reducing the pressure of data transmission when the network is congested and improving the efficiency of transmitting instructions.

[0190] like Figure 6As shown, an embodiment of the present application provides a device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0191] A memory 113, for storing computer programs;

[0192] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113, and implements the instruction issuing method provided by any of the above method embodiments, including:

[0193] For a device of a target device type in the Internet of Things platform, real-time monitoring of the real-time response time of the device to an instruction of a target instruction type;

[0194] Determine a target network status level corresponding to the instruction of the target instruction type based on the real-time response time;

[0195] Determine a target instruction issuing strategy corresponding to the instruction of the target instruction type based on the target network status level, wherein the instruction issuing strategy is used to adjust the transmission rate of the instruction of the target instruction type;

[0196] Instructions of the target instruction type are issued according to the target instruction issuing strategy.

[0197] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the instruction issuing method provided in any of the aforementioned method embodiments are implemented.

[0198] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0199] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0200] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0201] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A method for issuing instructions, characterized in that: The method comprises: For a device of a target device type in the Internet of Things platform, real-time monitoring of the real-time response time of the device to an instruction of a target instruction type; Determine a target network status level corresponding to the instruction of the target instruction type based on the real-time response time; Determine a target instruction issuing strategy corresponding to the instruction of the target instruction type based on the target network status level, wherein the instruction issuing strategy is used to adjust the transmission rate of the instruction of the target instruction type; Instructions of the target instruction type are issued according to the target instruction issuance strategy.

2. The method according to claim 1, characterized in that The real-time monitoring of the real-time response time of the device to the instruction of the target instruction type includes: At every preset time interval, obtaining a first response time of the device to each instruction of the target instruction type within a current time period; Performing a summing and averaging operation on the first response times of all the instructions to obtain a corresponding first response time mean; The first response time mean is determined as the real-time response time.

3. The method according to claim 1, characterized in that The determining, based on the real-time response time, a target network status level corresponding to the instruction of the target instruction type includes: Obtaining at least one preset network status level; Determine a response time range corresponding to each of the network status levels; Determine the response time range where the real-time response time is located as the target time range; The network status level corresponding to the target time range is determined as the target network status level corresponding to the instruction of the target instruction type.

4. The method according to claim 3, characterized in that: The determining of the response time range corresponding to each of the network status levels includes: Acquire a second response time of the device to each instruction of the target instruction type within a historical time period, wherein the historical time period is before the current time period; Performing a summing and averaging operation on the second response times of all the instructions to obtain a corresponding second response time mean; Determine the instructions corresponding to the second response time greater than the second response time mean as peak time period instructions, and determine the instructions corresponding to the second response time less than or equal to the second response time mean as normal time period instructions; Performing a summing and averaging operation on the second response times of all the peak time period instructions to obtain a corresponding peak time period average response time, and performing a summing and averaging operation on the second response times of all the normal time period instructions to obtain a corresponding normal time period average response time; Obtaining a preset time threshold, wherein the time threshold is less than the average response time in the normal time period; A response time range corresponding to each network status level is constructed based on the time threshold, the average response time in the normal time period, and the average response time in the peak time period.

5. The method according to claim 3, characterized in that: After issuing the target instruction type instruction according to the target instruction issuing strategy, the method further includes: Monitoring data transmission performance indicators of the IoT platform; When the data transmission performance index meets the preset index condition, the response time range corresponding to each network status level is kept unchanged; When the data transmission performance indicator does not meet the preset indicator condition, the upper limit and the lower limit of the response time range corresponding to each network status level are lowered.

6. The method according to claim 1, characterized in that The target instruction issuing strategy corresponding to the instruction of the target instruction type determined based on the target network status level includes: When the target network status level is low latency, determining the current instruction issuing strategy corresponding to the instruction of the target instruction type as the target instruction issuing strategy; When the target network status level is medium delay, a discrete issuance strategy is determined as the target instruction issuance strategy, wherein the discrete issuance strategy is used to issue multiple instructions issued at one time in batches; When the target network status level is high delay, a delayed discrete issuance strategy is determined as a target instruction issuance strategy, wherein the delayed discrete issuance strategy is used to issue multiple instructions issued at one time in batches after a delay of a period of time.

7. The method according to claim 1, characterized in that Before issuing the instruction of the target instruction type according to the target instruction issuing strategy, the method further includes: When the target network status level is low latency, the service quality parameter used to issue the instruction is adjusted to a first value, wherein when the instruction is issued according to the first value, the uniqueness of the instruction is ensured through a four-way handshake mechanism until confirmation; When the target network status level is medium delay, adjusting the service quality parameter used to send the instruction to a second value, wherein when sending the instruction according to the second value, the instruction will be resent until confirmation; When the target network status level is high delay, the service quality parameter used to send the instruction is adjusted to a third value, wherein the instruction is sent according to the third value without confirmation or retransmission.

8. A command issuing device, characterized in that: The device comprises: A time monitoring module, for monitoring the real-time response time of a device of a target device type in the IoT platform to an instruction of a target instruction type; A level determination module, configured to determine a target network status level corresponding to an instruction of the target instruction type based on the real-time response time; A strategy determination module, used to determine a target instruction issuing strategy corresponding to the instruction of the target instruction type based on the target network status level, wherein the instruction issuing strategy is used to adjust the transmission rate of the instruction of the target instruction type; An instruction issuing module is used to issue instructions of the target instruction type according to the target instruction issuing strategy.

9. A device, characterized in that: include: A processor and a memory, wherein the processor is used to execute an instruction issuing program stored in the memory to implement the instruction issuing method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the instruction issuing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Gateway congestion regulation and control method and system, gateway and network element

    CN102571552A

  • Equipment control method and device, equipment and storage medium

    CN113709770A

  • Data transmission method, device and system, electronic equipment and storage medium

    CN117560115A

  • Network information determination method and device, storage medium and electronic equipment

    CN117955838A

  • Network flow control method, device and equipment

    CN118368246A