An instruction issuing method and device, electronic equipment and storage medium

By monitoring the network status of the IoT platform in real time and dynamically adjusting the command transmission strategy of the MQTT data transmission system, the latency problem of traditional systems during network congestion is solved, and transmission efficiency and service quality are improved.

CN119520563BActive Publication Date: 2026-04-10GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Traditional MQTT data transmission systems cannot flexibly adjust to real-time network conditions, leading to increased transmission delays and reduced transmission efficiency when the network is congested.

Method used

By monitoring the real-time response time of target devices in the IoT platform, the target network status level is determined, and the transmission rate and strategy of instructions are adjusted based on the level, including adjusting the quality of service parameters and issuing instructions in batches to adapt to different network conditions.

Benefits of technology

It reduces data transmission pressure during network congestion, improves command transmission efficiency, and ensures service smoothness and integrity during peak periods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520563B_ABST
    Figure CN119520563B_ABST
Patent Text Reader

Abstract

The application provides an instruction issuing method and device, electronic equipment and storage medium. The method comprises: for a device of a target device type in an Internet of Things platform, monitoring a real-time response time of the device to a target instruction type; determining a target network state level corresponding to the target instruction type based on the real-time response time; determining a target instruction issuing strategy corresponding to the target instruction type based on the target network state level, wherein the instruction issuing strategy is used to adjust a transmission rate of the target instruction type; and issuing the target instruction type according to the target instruction issuing strategy. Through the application, the transmission rate of the instruction 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 and the transmission efficiency of the instruction can be improved when the network is congested.
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 particularly relates to an instruction issuing method and device, electronic equipment and storage medium. BACKGROUND

[0002] With the wide application of Internet of Things technology, MQTT (Message Queuing Telemetry Transport) as a lightweight message transmission protocol plays an important role in device communication. In actual application, for the scene of sending instructions by the Internet of Things platform to intelligent devices, the MQTT data transmission system mostly uses a fixed transmission frequency to transmit the instructions issued by the Internet of Things platform.

[0003] However, the complexity and instability of the network environment often affect the transmission efficiency of MQTT for instructions, and the traditional MQTT data transmission system cannot be flexibly adjusted according to the real-time network state, resulting in an increase in the transmission delay of instructions in network congestion, and a very low transmission efficiency of instructions. SUMMARY

[0004] The present application provides an instruction issuing method and device, electronic equipment and storage medium 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 state, resulting in an increase in the transmission delay of instructions in network congestion, and a very low transmission efficiency of instructions.

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

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

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

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

[0009] Issuing the target instruction type of instruction according to the target instruction issuing strategy.

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

[0011] acquire a first response time of each instruction of the target instruction type of the device in a current time period every preset time interval;

[0012] perform a sum average operation on the first response times of all the instructions to obtain a first response time average value corresponding to the first response times;

[0013] determine the first response time average value as the real-time response time.

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

[0015] acquire a preset at least one network state level;

[0016] determine a response time range corresponding to each network state level;

[0017] determine a target time range in which the real-time response time is located as the target time range;

[0018] determine a network state level corresponding to the target time range as the target network state level corresponding to the instruction of the target instruction type.

[0019] In one possible implementation, the determining of the response time range corresponding to each network state level comprises:

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

[0021] perform a sum average operation on the second response times of all the instructions to obtain a second response time average value corresponding to the second response times;

[0022] determine an instruction corresponding to a second response time greater than the second response time average value as a peak time period instruction, and determine an instruction corresponding to a second response time less than or equal to the second response time average value as a normal time period instruction;

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

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

[0025] construct a response time range corresponding to each of the network state levels 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, after the step of issuing the instructions of the target instruction type according to the target instruction issuing strategy, the method further includes:

[0027] monitoring a data transmission performance index of the Internet of Things platform;

[0028] in a case where the data transmission performance index meets a preset index condition, keeping the response time range corresponding to each of the network state levels unchanged;

[0029] in a case where the data transmission performance index does not meet the preset index condition, adjusting the upper limit and the lower limit of the response time range corresponding to each of the network state levels.

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

[0031] in a case where the target network state level is a low-delay level, determining a current instruction issuing strategy corresponding to the instructions of the target instruction type as the target instruction issuing strategy;

[0032] in a case where the target network state level is a medium-delay level, determining a discrete issuing strategy as the target instruction issuing strategy, where the discrete issuing strategy is used to batch issue a plurality of instructions issued at one time;

[0033] in a case where the target network state level is a high-delay level, determining a delay discrete issuing strategy as the target instruction issuing strategy, where the delay discrete issuing strategy is used to batch issue a plurality of instructions issued at one time after a delay.

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

[0035] in a case where the target network state level is a low-delay level, adjusting a quality of service parameter used for issuing instructions to a first value, where issuing instructions according to the first value ensures the uniqueness of the instructions until confirmation through a four-way handshake mechanism;

[0036] in a case where the target network state level is a medium-delay level, adjusting the quality of service parameter used for issuing instructions to a second value, where issuing instructions according to the second value is retransmitted until confirmation;

[0037] When the target network status level is high latency, the quality of service parameter used to issue commands is adjusted to a third value, wherein commands are issued according to the third value without confirmation or retransmission.

[0038] Secondly, this application provides an instruction issuing device, comprising:

[0039] The time monitoring module is used to monitor the real-time response time of a device to a target instruction type in the IoT platform.

[0040] The level determination module is used to determine the target network status level corresponding to the instruction of the target instruction type based on the real-time response time.

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

[0042] The instruction issuing module is used to issue instructions of the target instruction type in accordance with the target instruction issuing strategy.

[0043] In one possible implementation, the time monitoring module is specifically used for:

[0044] At preset time intervals, the first response time of the device for each instruction of the target instruction type within the current time period is obtained;

[0045] The average first response time of all the aforementioned instructions is summed and averaged to obtain the corresponding average first response time.

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

[0047] In one possible implementation, the level determination module is specifically used for:

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

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

[0050] The response time range within which the real-time response time falls is defined 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 one possible implementation, the level determination module is further configured to:

[0053] acquire a second response time of the device for each instruction of the target instruction type in a historical time period, wherein the historical time period is before the current time period;

[0054] perform a sum-average operation on the second response times of all the instructions to obtain a corresponding second response time average;

[0055] determine an instruction corresponding to a second response time greater than the second response time average as a peak time period instruction, and determine an instruction corresponding to a second response time less than or equal to the second response time average as a normal time period instruction;

[0056] perform a sum-average operation on the second response times of all the peak time period instructions to obtain a corresponding peak time period average response time, and perform a sum-average operation on the second response times of all the normal time period instructions to obtain a corresponding normal time period average response time;

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

[0058] construct a response time range corresponding to each of the network state levels based on the time threshold, the normal time period average response time, and the peak time period average response time.

[0059] In one possible implementation, the apparatus further includes an indicator monitoring module, configured to:

[0060] monitor a data transmission performance indicator of the Internet of Things platform;

[0061] in a case where the data transmission performance indicator meets a preset indicator condition, keep the response time range corresponding to each of the network state levels unchanged;

[0062] in a case where 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 of the network state levels.

[0063] In one possible implementation, the policy determination module is specifically configured to:

[0064] in a case where the target network state level is a low delay, determine a current instruction issuing policy of the instruction of the target instruction type as a target instruction issuing policy;

[0065] in a case where the target network state level is a medium delay, determine a discrete issuing policy as the target instruction issuing policy, wherein the discrete issuing policy is used to batch issue a plurality of instructions issued at a time;

[0066] In a case where the target network state level is high delay, a delay discrete issuing strategy is determined as the target instruction issuing strategy, wherein the delay discrete issuing strategy is used to issue the multiple instructions issued at one time in batches after a delay.

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

[0068] In a case where the target network state level is low delay, a quality of service parameter used for issuing instructions is adjusted to a first value, wherein the uniqueness of the instructions is ensured by a four-way handshake mechanism until confirmation when the instructions are issued according to the first value;

[0069] In a case where the target network state level is medium delay, the quality of service parameter used for issuing instructions is adjusted to a second value, wherein the instructions are retransmitted until confirmation when the instructions are issued according to the second value;

[0070] In a case where the target network state level is high delay, the quality of service parameter used for issuing instructions is adjusted to a third value, wherein no confirmation or retransmission is performed after the instructions are issued according to the third value.

[0071] In a third aspect, the present application provides an apparatus, including: a processor and a memory, the processor is configured to execute an instruction issuing program stored in the memory to implement the instruction issuing method in any one of the first aspect.

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

[0073] Compared with the prior art, the above technical solution provided by the embodiments of the present application has the following advantages: the method provided by the embodiments of the present application monitors the real-time response time of a target instruction type of instruction of a target device type of device in an Internet of Things platform in real time, then determines a target network state level corresponding to the target instruction type of instruction based on the real-time response time, and determines a target instruction issuing strategy corresponding to the target instruction type of instruction based on the target network state level, wherein the instruction issuing strategy is used to adjust the transmission rate of the target instruction type of instruction, and finally, the target instruction type of instruction is issued according to the target instruction issuing strategy. Through the present application, the transmission rate of the instruction 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 and the efficiency of transmitting the instruction can be improved when the network is congested. BRIEF DESCRIPTION OF DRAWINGS

[0074] The accompanying drawings, which are incorporated herein and constitute a part of the 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 technical solutions of the embodiments of the present application or the prior art, the accompanying drawings required to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without any creative effort.

[0076] One or more embodiments are illustrated by the drawings in the accompanying drawings, which do not constitute a limitation on the embodiments, and elements with the same reference numerals in the drawings represent similar elements, unless otherwise specified. The drawings in the accompanying drawings do not constitute a proportional limit.

[0077] Figure 1 An embodiment flowchart of an instruction issuing method provided by the embodiments of the present application;

[0078] Figure 2 An overall service flowchart of an instruction issuing method provided by the embodiments of the present application;

[0079] Figure 3 An embodiment flowchart of real-time monitoring of real-time response time of the device to instructions of a target instruction type provided by the embodiments of the present application;

[0080] Figure 4 An embodiment flowchart of determining a target network state level corresponding to instructions of the target instruction type based on the real-time response time provided by the embodiments of the present application;

[0081] Figure 5 An embodiment block diagram of an instruction issuing device provided by the embodiments of the present application;

[0082] Figure 6 A structural schematic diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0083] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative effort fall within the scope of protection of the present application.

[0084] The following disclosure provides many different embodiments or examples for implementing various aspects of the application. For the sake of brevity and clarity, descriptions of the various examples are described in the following disclosure. Of course, it is to be understood that they are merely examples and are not intended to limit the application in any manner. Moreover, the application can employ additional or different features, and the application can be practiced without some of the features described. Also, the application can be implemented in different embodiments and of the same application. Such repetition is intended to aid in understanding the present application and is not intended to highlight the relationship between the various embodiments and / or aspects discussed.

[0085] In order to solve the technical problem that the conventional MQTT data transmission system in the prior art cannot be flexibly adjusted according to the real-time network state, resulting in an increase in the transmission delay of instructions when the network is congested, and the transmission efficiency of instructions is very low, the application provides an instruction issuing method, which can dynamically adjust the transmission rate of instructions according to the real-time network state of the Internet of Things platform, so as to reduce the data transmission pressure when the network is congested and improve the efficiency of transmitting instructions.

[0086] Figure 1 An embodiment flowchart of an instruction issuing method provided by the embodiments of the application.

[0087] As shown in Figure 1 The method comprises the following steps:

[0088] Step 101, 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 a target instruction type of instruction.

[0089] The instruction issuing method provided by the embodiments of the application is used to allocate MQTT (Message Queuing Telemetry Transport, Message Queuing Telemetry Transport) proxy service instruction issuing strategy by monitoring the network state, and then issue instructions through the strategy.

[0090] The above Internet of Things platform includes various types of intelligent devices, such as refrigerators, televisions, washing machines, intelligent lamps, air conditioners, etc. In actual application, the Internet of Things platform will issue various types of instructions to each intelligent device, such as data transmission instructions: used to transmit data between memory and registers; arithmetic operation instructions: used to perform addition, subtraction, multiplication, division, etc. arithmetic operation; logic operation and shift instruction: used to perform logic operation and bit shift operation; string operation instruction: used to process string operation; control transfer instruction: used to change the execution flow of the program; processor control instruction: used to control the operation of the processor, etc.

[0091] The target device type can be any device type contained in the Internet of Things platform, which can be specified by the user in actual application; or each device type contained in the Internet of Things platform can be taken as a target device type, so as to monitor each type of device.

[0092] The target instruction type can be any instruction type, which can be specified by a user in actual application. Alternatively, each instruction type contained in the Internet of Things platform can be taken as the target instruction type, so as to monitor the delivery of each type of instruction.

[0093] The real-time response time refers to the response time of the target device type when the Internet of Things platform delivers the target instruction type to the target device type through the MQTT proxy service, that is, the difference between the time when the MQTT proxy service delivers the instruction to the target device type and the time when the target device type reports the instruction to the MQTT proxy service.

[0094] How to monitor the real-time response time of the target device type to the target instruction type will be explained in detail in the following embodiments, which will not be described here.

[0095] Step 102, determining the target network state level corresponding to the target instruction type based on the real-time response time.

[0096] The target network state level includes low delay, medium delay and high delay, wherein the low delay indicates that the server is in the optimal performance state, the medium delay indicates that the current network is slightly congested, and the high delay indicates that the current network is seriously congested.

[0097] In the embodiments of the present application, the target network state level can be determined by the real-time response time of the target device type to the target instruction type, so as to understand the current network state, thereby facilitating subsequent adjustment of the instruction transmission strategy according to the network state.

[0098] How to determine the target network state level corresponding to the target instruction type based on the real-time response time will be explained in detail in the following embodiments, which will not be described here.

[0099] Step 103, determining the target instruction delivery strategy corresponding to the target instruction type based on the target network state level, wherein the instruction delivery strategy is used to adjust the transmission rate of the target instruction type.

[0100] Step 104, delivering the target instruction type according to the target instruction delivery strategy.

[0101] For the convenience of understanding, the following unified description is made for steps 103 and 104:

[0102] The target instruction issuing strategy is used to adjust the transmission rate of the instructions of the target instruction type. The target instruction issuing strategy includes an issuing strategy for low delay, an issuing strategy for medium delay, and an issuing strategy for high delay.

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

[0104] In a case where the target network state level is low delay, a current instruction issuing strategy corresponding to the instructions of the target instruction type is determined as the target instruction issuing strategy.

[0105] In a case where the target network state level is medium delay, a discrete issuing strategy is determined as the target instruction issuing strategy, where the discrete issuing strategy is used to batch issue a plurality of instructions issued at one time.

[0106] In a case where the target network state level is high delay, a delay discrete issuing strategy is determined as the target instruction issuing strategy, where the delay discrete issuing strategy is used to batch issue the plurality of instructions issued at one time after a delay.

[0107] As can be seen from the above description, in the embodiment, when the target network state level is low delay, it means that the server is in the optimal performance state, at this time, the transmission rate of the instructions of the target instruction type does not need to be adjusted, and therefore, the current instruction issuing strategy is kept unchanged, and the instructions of the target instruction type are continuously issued according to the current instruction issuing strategy.

[0108] When the target network state level is medium delay, it means that the current network is slightly congested, and all the instructions of the target instruction type are discretely issued by the discrete issuing strategy, so that the originally large number of instructions issued at one time are discretely issued in batches, thereby shortening the device response time and allowing users to experience smooth services in peak periods.

[0109] When the target network state level is high delay, it means that the current network is seriously congested, and the delay discrete issuing strategy is used to delay the issuing of all the instructions of the target instruction type, and on the basis of the delay, the discrete issuing of all the instructions is performed, thereby effectively relieving the bandwidth pressure, shortening the device response time, and allowing users to experience the integrity of services in peak periods.

[0110] Further, the time for delaying the issuing of the instructions can be determined according to the length of the real-time response time, that is, the longer the real-time response time, the longer the time for delaying the issuing of the instructions.

[0111] In the application, in the case that the target network state level is higher than the high delay, the user can be informed 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, in step 104, the following steps can also be included:

[0113] Step B1, in the case that the target network state level is low delay, the quality of service parameter for issuing instructions is adjusted to a first value, wherein the uniqueness of the instruction is ensured by four-way handshake until confirmation when the instruction is issued according to the first value;

[0114] Step B2, in the case that the target network state level is medium delay, the quality of service parameter for issuing instructions is adjusted to a second value, wherein the instruction is retransmitted until confirmation when the instruction is issued according to the second value;

[0115] Step B3, in the case that the target network state level is high delay, the quality of service parameter for issuing instructions is adjusted to a third value, wherein no confirmation or retransmission is performed after the instruction is issued according to the third value.

[0116] In the application, MQTT provides a QoS mechanism, the core of which is to design multiple 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, which are: QoS 0 (i.e. the third value), at most one delivery, no confirmation or retransmission after sending; QoS1 (i.e. the second value), at least one delivery, the message will be retransmitted until confirmation; QoS2 (i.e. the first value), only one delivery, the uniqueness of the message is ensured by four-way handshake until confirmation. Among them, using QoS 0 may lose messages, using QoS1 can guarantee that the message is received, but the message may be repeated, using QoS2 can guarantee that the message is neither lost nor repeated. The QoS level from low to high not only means the improvement of message reliability, but also means the improvement of transmission complexity.

[0117] In this embodiment, the quality of service of the MQTT proxy service can be set according to the target network state level, that is, the higher the delay, the smaller the corresponding quality of service level, so that the transmission frequency can be automatically reduced when the network is congested, thereby reducing the data transmission pressure and avoiding delay and packet loss caused by network congestion, and the transmission frequency can be increased when the network is idle, thereby fully utilizing the available bandwidth resources and improving the transmission service quality of the instructions.

[0118] For ease of understanding, the overall service flowchart of the instruction issuing shown in Figure 2 is used to uniformly describe steps 101 to 104:

[0119] As shown in Figure 2As shown, the time when the IoT platform issues a target type instruction to a device through an MQTT broker service is recorded, and the instruction receiving time reported by the device is also recorded, and the recorded data is reported to a network monitoring service. After the network monitoring service collects these data, the real-time response time of the device to the instruction is calculated, and then the network state is obtained through the real-time response time, and the instruction issuing strategy is determined through the network state. Finally, the instruction issuing strategy is fed back to the MQTT broker service, and the MQTT broker service issues the instruction of the corresponding type according to the instruction issuing strategy, and the device executes the instruction after receiving the instruction. Thus, the instruction issuing process is completed.

[0120] The technical scheme provided by the embodiments of the present application is aimed at a target device type in an IoT platform, and real-time monitoring of the real-time response time of the device to a target instruction type, then determining a target network state level corresponding to the target instruction type based on the real-time response time, and determining a target instruction issuing strategy corresponding to the target instruction type based on the target network state level, wherein the instruction issuing strategy is used to adjust the transmission rate of the target instruction type, and finally issuing the target instruction type according to the target instruction issuing strategy. Through the present application, the transmission rate of the instruction can be dynamically adjusted according to the real-time network state of the IoT platform, so that the data transmission pressure can be reduced and the transmission efficiency of the instruction can be improved when the network is congested.

[0121] Figure 3 An embodiment flowchart for real-time monitoring of the real-time response time of the device to the target instruction type is provided for the embodiments of the present application. Figure 3 The flowchart shown in Figure 1 Based on the flowchart shown, the following steps are included:

[0122] Step 301, every preset time interval, obtain the first response time of the device to each instruction of the target instruction type in the current time period;

[0123] Step 302, sum and average operation is performed on the first response time of all the instructions to obtain the corresponding first response time mean;

[0124] Step 303, the first response time mean is determined as the real-time response time.

[0125] For ease of understanding, the following unified description is made for steps 301 to 303:

[0126] In the embodiments of the present application, 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 Internet of Things platform to the devices of the target device type in the current time period is obtained by summing and averaging the response times of all instructions of the target instruction type, and then the first response time average is determined as the real-time response time. In this way, the influence of individual data can be excluded, and the calculation result is more accurate.

[0127] Figure 4 An embodiment flowchart for determining the target network state level corresponding to the instructions of the target instruction type based on the real-time response time is provided in the embodiments of the present application. Figure 4 The flowchart shown in Figure 1 Based on the flowchart shown in

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

[0129] Step 402: Determine the response time range corresponding to each network state level.

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

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

[0132] For the convenience of understanding, the steps 401 to 404 are uniformly described as follows:

[0133] The network state level is used to represent the network state, including low delay, medium delay and high delay.

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

[0135] Specifically, step 402 includes:

[0136] Step C1: Obtain the second response time of each instruction of the target instruction type of the device in the historical time period, wherein the historical time period is before the current time period.

[0137] Step C2: Sum and average the second response times of all instructions to obtain the corresponding second response time average.

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

[0139] Step C4, performing sum average operation on the second response time of all the peak time period instructions to obtain the corresponding peak time period average response time, and performing sum average operation on the second response time of all the normal time period instructions to obtain the corresponding normal time period average response time;

[0140] Step C5, obtaining a preset time threshold, wherein the time threshold is less than the normal time period average response time;

[0141] Step C6, constructing the response time range corresponding to each network status level based on the time threshold, the normal time period average response time and the peak time period average response time.

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

[0143] In this embodiment, the average of the response time of the devices of the target device type to the instructions of the target instruction type in the historical time period is calculated first, then the peak time period instructions corresponding to the second response time greater than the average of the second response time and the normal time period instructions corresponding to the second response time less than or equal to the average of the second response time are obtained by comparing the average with the response time of each device to each instruction, finally, the peak time period average response time (HRT) is obtained by performing sum average operation on the response time corresponding to the peak time period instructions, and the normal time period response time (NRT) is obtained by performing sum average operation on the response time corresponding to the normal time period instructions.

[0144] Further, the corresponding response time range is constructed according to the HRT and the NRT. Specifically, a time threshold less than the NRT is determined, and three time ranges are divided by the time threshold, the NRT and the HRT, thereby obtaining the response time range corresponding to each network status level.

[0145] Finally, the network status level corresponding to the response time range in which the real-time response time is located is determined as the target network status level.

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

[0147] Figure 4 According to the response time range, the target network state level corresponding to the real-time response time is determined. In this way, the response time of the device to the instruction in the historical time period can be taken as a reference to determine the network state in the current time period, without the need for manual judgment, thereby improving the efficiency and accuracy of the judgment.

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

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

[0150] Step D2, if the data transmission performance index meets the preset index condition, keeping the response time range corresponding to each network state level unchanged;

[0151] Step D3, if the data transmission performance index does not meet the preset index condition, adjusting the upper limit and the lower limit of the response time range corresponding to each network state level.

[0152] The data transmission performance index is used to represent the data transmission performance of the Internet of Things platform.

[0153] The preset index condition is used to represent whether the data transmission performance of the Internet of Things platform meets the user's expectation.

[0154] In the embodiments of the present application, if the data transmission performance index meets the preset index condition, it means that the current data transmission performance of the Internet of Things platform meets the user's expectation, and the response time range corresponding to each network state level can be kept unchanged, and the instruction issuing strategy can continue to be determined according to the current divided response time range; if the data transmission performance index does not meet the preset index condition, it means that the current data transmission performance of the Internet of Things platform does not meet the user's expectation, at this time, the upper limit and the lower limit of the response time range corresponding to each network state level are adjusted, thereby further improving the system adaptability and performance.

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

[0156] Figure 5 An embodiment block diagram of an instruction issuing device provided by an embodiment of the present application is shown in FIG. 1. As shown in the figure, the device includes: Figure 5

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

[0158] A grade determining module 52 is configured to determine a target network state grade corresponding to the target instruction type of instruction based on the real-time response time.

[0159] A strategy determining module 53 is configured to determine a target instruction issuing strategy corresponding to the target instruction type of instruction based on the target network state grade, wherein the instruction issuing strategy is used to adjust a transmission rate of the target instruction type of instruction.

[0160] An instruction issuing module 54 is configured to issue the target instruction type of instruction according to the target instruction issuing strategy.

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

[0162] Obtain a first response time of the device for each instruction of the target instruction type in a current time period at every preset time interval;

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

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

[0165] In a possible implementation, the grade determining module is specifically configured to:

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

[0167] Determine a response time range corresponding to each network state grade.​

[0168] determining a target time range as a response time range in which the real-time response time is located;

[0169] determining a target network state level corresponding to the target time range as a target network state level corresponding to the target instruction type.

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

[0171] obtain a second response time of the device for each instruction of the target instruction type in a historical time period, wherein the historical time period is before a current time period;

[0172] perform a sum average operation on the second response time of all the instructions to obtain a corresponding second response time average;

[0173] determine an instruction corresponding to a second response time greater than the second response time average as a peak time period instruction, and determine an instruction corresponding to a second response time less than or equal to the second response time average as a normal time period instruction;

[0174] perform a sum average operation on the second response time of all the peak time period instructions to obtain a corresponding peak time period average response time, and perform a sum average operation on the second response time of all the normal time period instructions to obtain a corresponding normal time period average response time;

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

[0176] construct a response time range corresponding to each network state level based on the time threshold, the normal time period average response time, and the peak time period average response time.

[0177] In a possible implementation, the apparatus further includes an index monitoring module configured to:

[0178] monitor a data transmission performance index of the Internet of Things platform;

[0179] in a case where the data transmission performance index meets a preset index condition, keep the response time range corresponding to each network state level unchanged;

[0180] in a case where the data transmission performance index does not meet the preset index condition, lower an upper limit and a lower limit of the response time range corresponding to each network state level.

[0181] In a possible implementation, the policy determining module is specifically configured to:

[0182] in the case that the target network state level is low delay, determining a current instruction issuing policy corresponding to the target instruction type as a target instruction issuing policy;

[0183] in the case that the target network state level is medium delay, determining a discrete issuing policy as the target instruction issuing policy, wherein the discrete issuing policy is used to issue a plurality of instructions in batches at one time;

[0184] in the case that the target network state level is high delay, determining a delay discrete issuing policy as the target instruction issuing policy, wherein the delay discrete issuing policy is used to issue a plurality of instructions in batches at one time after a delay.

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

[0186] in the case that the target network state level is low delay, adjusting a quality of service parameter used for issuing instructions to a first value, wherein issuing instructions according to the first value ensures the uniqueness of instructions until confirmation through a four-way handshake mechanism;

[0187] in the case that the target network state level is medium delay, adjusting the quality of service parameter used for issuing instructions to a second value, wherein issuing instructions according to the second value is retransmitted until confirmation;

[0188] in the case that the target network state level is high delay, adjusting the quality of service parameter used for issuing instructions to a third value, wherein issuing instructions according to the third value is not confirmed nor retransmitted.

[0189] The technical scheme provided by the embodiments of the present application, for a target device type in an Internet of Things platform, monitors the real-time response time of the device to instructions of a target instruction type in real time, then determines a target network state level corresponding to the target instruction type based on the real-time response time, and determines a target instruction issuing policy corresponding to the target instruction type based on the target network state level, wherein the instruction issuing policy is used to adjust the transmission rate of the target instruction type, and finally, the target instruction type is issued according to the target instruction issuing policy. Through the present application, the transmission rate of instructions 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 and the efficiency of transmitting instructions can be improved when the network is congested.

[0190] As Figure 6As shown, the embodiment of the present application provides a device, comprising 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 complete mutual communication through the communication bus 114,

[0191] The memory 113 is used for storing a computer program.

[0192] In an embodiment of the present application, the processor 111 is used for executing the program stored in the memory 113, and realizes the instruction issuing method provided by any one of the foregoing method embodiments, comprising the following steps:

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

[0194] A target network state level corresponding to the target instruction type instruction is determined based on the real-time response time;

[0195] A target instruction issuing strategy corresponding to the target instruction type instruction is determined based on the target network state level, wherein the instruction issuing strategy is used for adjusting a transmission rate of the target instruction type instruction;

[0196] The target instruction type instruction is issued according to the target instruction issuing strategy.

[0197] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the instruction issuing method provided by any one of the foregoing method embodiments.

[0198] The device embodiment described above is only schematic, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place or distributed on a plurality of network units. According to actual needs, some or all of the modules can be selected to achieve the purpose of the embodiment.

[0199] Those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course can be implemented by hardware. Based on such an understanding, the technical solutions described above essentially or in other words make contributions to the related art, and can be embodied in a software product form, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, or an optical disk, and includes a plurality of instructions to cause 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 is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and "has" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their occurrence in the particular order

[0201] The above description is merely that of specific embodiments of the present application, and thus is not intended to limit the present application. Based on the above description, 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 generic principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An instruction issuing method, characterized by, The method comprises: Real-time monitoring of the real-time response time of the device to the target instruction type of the target device type in the Internet of Things platform; Determine the target network state level corresponding to the target instruction type of the instruction based on the real-time response time; Determine the target instruction issuing strategy corresponding to the target instruction type of the instruction based on the target network state level, wherein the instruction issuing strategy is used to adjust the transmission rate of the target instruction type of the instruction; According to the target instruction issuing strategy, the target instruction type of the instruction is issued; Wherein, the target network state level corresponding to the target instruction type of the instruction is determined based on the real-time response time, comprising: Obtain at least one preset network state level; Determine the response time range corresponding to each network state level; Determine the target time range of the real-time response time range; The network state level corresponding to the target time range is determined as the target network state level corresponding to the target instruction type of the instruction; The determination of the response time range corresponding to each network state level comprises: Obtain the second response time of the device to each instruction of the target instruction type in the historical period, wherein the historical period is before the current period; Sum average operation is performed on the second response time of all the instructions to obtain the corresponding second response time mean; Instructions corresponding to the second response time greater than the second response time mean are determined as peak time period instructions, and instructions corresponding to the second response time less than or equal to the second response time mean are determined as normal time period instructions; Sum average operation is performed on the second response time of all the peak time period instructions to obtain the corresponding peak time period average response time, and sum average operation is performed on the second response time of all the normal time period instructions to obtain the corresponding normal time period average response time; Obtain a preset time threshold, wherein the time threshold is less than the normal time period average response time; Based on the time threshold, the normal time period average response time and the peak time period average response time, the response time range corresponding to each network state level is constructed.

2. The method of claim 1, wherein, The real-time monitoring of the real-time response time of the device to the target instruction type of the instruction comprises: Every preset time interval, obtain the first response time of the device to each instruction of the target instruction type in the current period; Sum average operation is performed on the first response time of all the instructions to obtain the corresponding first response time mean; The first response time mean is determined as the real-time response time.

3. The method of claim 1, wherein, After the target instruction type of the instruction is issued according to the target instruction issuing strategy, it further comprises: Monitoring the data transmission performance index of the Internet of Things platform; In the case that the data transmission performance index meets the preset index condition, the response time range corresponding to each network state level remains unchanged; In a case where the data transmission performance index does not meet the preset index condition, the upper limit and the lower limit of the response time range corresponding to each network state level are adjusted downward.

4. The method of claim 1, wherein, The target instruction issuing strategy corresponding to the target instruction type is determined based on the target network state level. In a case where the target network state level is low delay, the current instruction issuing strategy corresponding to the target instruction type is determined as the target instruction issuing strategy. In a case where the target network state level is medium delay, a discrete issuing strategy is determined as the target instruction issuing strategy, wherein the discrete issuing strategy is used to batch issue a plurality of instructions issued at one time. In a case where the target network state level is high delay, a delay discrete issuing strategy is determined as the target instruction issuing strategy, wherein the delay discrete issuing strategy is used to batch issue a plurality of instructions issued at one time after a delay.

5. The method of claim 1, wherein, Before the target instruction of the target instruction type is issued according to the target instruction issuing strategy, the following steps are further included. In a case where the target network state level is low delay, a quality of service parameter used for issuing instructions is adjusted to a first value, wherein the uniqueness of an instruction is ensured through four handshake mechanisms until the instruction is confirmed when the instruction is issued according to the first value. In a case where the target network state level is medium delay, a quality of service parameter used for issuing instructions is adjusted to a second value, wherein the instruction is reissued until the instruction is confirmed when the instruction is issued according to the second value. In a case where the target network state level is high delay, a quality of service parameter used for issuing instructions is adjusted to a third value, wherein no confirmation or reissuing is performed after the instruction is issued according to the third value.

6. An instruction issuing apparatus characterized by comprising: The apparatus includes: a time monitoring module configured to monitor, in real time, a real-time response time of a target instruction type of a device in an Internet of Things platform; a level determination module configured to determine a target network state level corresponding to the target instruction type based on the real-time response time; a strategy determination module configured to determine a target instruction issuing strategy corresponding to the target instruction type based on the target network state level, wherein the instruction issuing strategy is used to adjust a transmission rate of the target instruction type; an instruction issuing module configured to issue the target instruction type according to the target instruction issuing strategy; The level determination module is specifically configured to: obtain at least one preset network state level; determine a response time range corresponding to each network state level; determine a target time range in which the real-time response time is located; determine a network state level corresponding to the target time range as a target network state level corresponding to the target instruction type; The level determination module is further configured to: obtain a second response time of each instruction of the target instruction type in the device in a historical time period, wherein the historical time period is before a current time period; perform a sum average operation on the second response time of all the instructions to obtain a corresponding second response time average; and determine a target time range in which the second response time average is located as a target time range corresponding to the target instruction type. determining instructions corresponding to the second response time greater than the second response time average as peak time period instructions, and determining instructions corresponding to the second response time less than or equal to the second response time average as normal time period instructions; performing summation average operation on the second response time of all the peak time period instructions to obtain corresponding peak time period average response time, and performing summation average operation on the second response time of all the normal time period instructions to obtain corresponding normal time period average response time; obtaining a preset time threshold, wherein the time threshold is less than the normal time period average response time; constructing a response time range corresponding to each of the network state levels based on the time threshold, the normal time period average response time and the peak time period average response time.

7. An apparatus, comprising: comprise: a processor and a memory, the processor being configured to execute an instruction issuing program stored in the memory to implement the instruction issuing method in any one of claims 1-5.

8. A storage medium, characterized by 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 in any one of claims 1-5.

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