Method, device, electronic device and medium for improving service quality of Internet of Things

By building a message queue and virtual queue model, combining the Liyapunov drift plus penalty function, dynamically adjusting the quality level of IoT service, the stability and service quality problems of the IoT service system under the situation of a large number of access devices are solved, and the system is realized Improved stability and service quality.

CN115914131BActive Publication Date: 2025-01-10ELECTRIC POWER RES INST STATE GRID SHANXI ELECTRIC POWER +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211346283.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-01-10
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

When existing IoT service systems face a large number of access devices, it is difficult to ensure system stability and service quality, resulting in service crashes and immeasurable losses.

Method used

By building a message queue model and a virtual queue model, a message processing delay constraint model is established, and the system stability threshold is determined using the Liyapunov drift plus penalty function, and the message service quality level is dynamically adjusted to ensure system stability and improve service quality.

Benefits of technology

It effectively restricts messages to be processed within the maximum delay, ensures system stability, and improves the overall service quality of the Internet of Things service system by dynamically adjusting the service quality level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914131B_ABST
    Figure CN115914131B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of Internet of Things, and discloses a method, device, electronic device and medium for improving the service quality of Internet of Things, and the method includes: constructing a message queue model and a virtual queue model; constructing a message processing delay constraint model of the Internet of Things service system according to the message queue model and the virtual queue model; constructing a Lyapunov drift penalty function and setting a system stability threshold of the Internet of Things service system under the condition of satisfying the message processing delay constraint model; determining the system state of the target time slot based on the set system stability threshold and the Lyapunov drift penalty function; adjusting the quality level of the Internet of Things message service based on the system state of the target time slot. The present application takes into account both the stability of the system and the service quality of the system by constructing a Lyapunov drift penalty function, setting a system stability threshold, determining the system state of the Internet of Things service, and adjusting the message service quality level of the system based on the system state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of Internet of Things, and in particular to a method, device, electronic device and medium for improving the service quality of Internet of Things. Background Art

[0002] The MQTT protocol (Message Queuing Telemetry Transport) can provide three levels of message service quality for devices connected to the IoT service system. A high level of message service quality means higher resource consumption, while a low level of message service quality consumes less resources, but the reliability of its data transmission cannot be guaranteed.

[0003] As the number of connected devices increases, the processing pressure on the server will also increase. When the amount of data transmitted by the device reaches the upper limit of the server's tolerance, the service will fall into an unstable state, and in serious cases it will even crash and cause immeasurable losses. How to improve the service quality of the IoT service system while ensuring the stability of the system is a rather difficult problem. Summary of the invention

[0004] In view of the above situation, the embodiments of the present application provide a method, device, electronic device and storage medium for improving the service quality of the Internet of Things, aiming to solve the problem of how to improve the service quality of the Internet of Things service system while ensuring system stability.

[0005] In a first aspect, the embodiments of the present application provide a method for improving the quality of Internet of Things services, including:

[0006] Construct message queue model and virtual queue model;

[0007] According to the message queue model and the virtual queue model, a message processing delay constraint model of the Internet of Things service system is constructed;

[0008] Under the condition that the message processing delay constraint model is satisfied, a Lyapunov drift penalty function is constructed, and a system stability threshold of the Internet of Things service system is set;

[0009] Determine the system state of the target time slot based on the set system stability threshold and the Lyapunov drift penalty function;

[0010] Based on the system status of the target time slot, the Internet of Things message service quality level is adjusted.

[0011] In a second aspect, the embodiment of the present application further provides a device for improving the quality of Internet of Things services, including:

[0012] A first construction unit is used to construct a message queue model and a virtual queue model;

[0013] A second construction unit is used to establish a message processing delay constraint model of the Internet of Things service system according to the message queue model and the virtual queue model;

[0014] A third construction unit is used to construct a Lyapunov drift penalty function and set a system stability threshold of the Internet of Things service system under the condition that the message processing delay constraint model is satisfied;

[0015] A determination unit, configured to determine a system state of a target time slot based on a set system stability threshold and the Lyapunov drift penalty function;

[0016] An adjustment unit is used to adjust the Internet of Things message service quality level based on the system status of the target time slot.

[0017] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes the processing of the above-mentioned training method.

[0018] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device performs the processing of the above-mentioned training method.

[0019] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:

[0020] This application constructs a message queue model and a virtual queue model; since the virtual queue model can be used to constrain the maximum delay of the Internet of Things service system, the message processing delay constraint model of the Internet of Things service system constructed according to the message queue model and the virtual queue model can ensure that the messages in the message queue are processed within the maximum delay, thereby ensuring the basic stability of the Internet of Things service system. At the same time, the message queue model and the virtual queue model are used to construct the Lyapunov drift penalty function, and the system state of the Internet of Things service system is determined based on the relationship between the Lyapunov drift penalty function and the set system stability threshold; based on the system state, the quality level of the Internet of Things message service can be dynamically adjusted, so as to achieve the purpose of improving the service quality of the Internet of Things service system while ensuring the stability of the Internet of Things service system. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0022] Figure 1 A flowchart of a method for improving the quality of Internet of Things services according to an embodiment of the present application;

[0023] Figure 2 A flowchart of a method for improving the quality of Internet of Things services according to another embodiment of the present application;

[0024] Figure 3 is a schematic diagram of the structure of single group data according to an embodiment of the present application;

[0025] Figure 4 A schematic diagram of a process for mining data to be processed according to another embodiment of the present application;

[0026] Figure 5 A schematic diagram of a process for mining data to be processed according to another embodiment of the present application;

[0027] Figure 6 A schematic diagram of the structure of a device for improving the quality of Internet of Things services according to an embodiment of the present application;

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

[0029] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only 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 the present application.

[0030] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0031] In general, the Internet of Things platform based on the MQTT protocol usually directly selects a service quality that is more suitable for the current data characteristics, or leaves the data service quality to the access end to specify. This approach is fine under normal circumstances, but if there is a sharp increase in the amount of transmitted data, it may cause the server to crash. Based on this, the present application proposes a method for improving the service quality of the Internet of Things. The present application can provide feedback and adjustment to the message service quality of the access end according to the status of its remaining service capacity, so as to improve the external service quality of the Internet of Things.

[0032] Figure 1 FIG. 1 is a flow chart of a method for improving the quality of Internet of Things services according to an embodiment of the present application; Figure 1 It can be seen from the method shown that the present application at least includes steps S101 to S105:

[0033] Step S101, constructing a message queue model and a virtual queue model.

[0034] This application is applicable to the Internet of Things service system based on the MQTT protocol. It can be assumed that there are K terminals in the Internet of Things service system that can send messages to the message proxy server. These K terminals can communicate directly with the message proxy server, and they are equal and independent of each other. Each terminal also has its own unique terminal identifier. The MQTT protocol communication model of the Internet of Things service system can be treated as a discrete time system model. On this basis, a message queue model and a virtual queue model are constructed.

[0035] Specifically, in some embodiments of the present application, in the above method, the construction of the message queue model includes: in the target time slot, the target terminal transmits messages to the message proxy server, the number of lost messages in the message transmission process, and the number of messages that are successfully transmitted and processed by the message proxy server constitute a first message number; wherein the total number of messages transmitted by the target terminal to the message proxy server is the initial message number; the number of unprocessed messages in the target time slot and in the message proxy server is subtracted from the first message number to obtain a second message number; the maximum value of the second message number and the preset value is determined as the third message number; the sum of the third message number and the initial message number is determined as the number of unprocessed messages in the message proxy server at the next time slot of the target time slot.

[0036] In the target time slot, the target terminal transmits messages to the message proxy server. The number of messages lost during the message transmission process and the number of messages successfully transmitted and processed by the message proxy server constitute the first message number; wherein the total number of messages transmitted by the target terminal to the message proxy server is the initial message number. The second message number is obtained by subtracting the first message number from the number of messages not processed in the message proxy server in the target time slot. If the second message number is greater than the preset value, the number of messages not processed in the message proxy server at the next time slot of the target time slot is set to the sum of the second message number and the initial message number; if the second message number is equal to the preset value, the number of messages not processed in the message proxy server at the next time slot of the target time slot is set to the sum of the preset value and the initial message number.

[0037] Specifically, in some embodiments, the number of unprocessed messages in the message proxy server at the next time slot of the target time slot can be determined according to the following formula (1):

[0038] Q k (t+1)=max[Q k (t)-d k (t)-b k (t),0]+a k (t) Formula (1);

[0039] Where, t∈{0, 1, 2…}, for the kth terminal, at time slot t, Q k (t) is the number of unprocessed messages in the message proxy server at the target time slot; d k (t) is the number of lost messages during message transmission; b k (t) is the number of messages that are successfully transmitted and processed by the message proxy server; k (t) is the total number of messages transmitted by the kth terminal to the message proxy server.

[0040] For example, for the first terminal, in time slot 2, Q 1 (2) 1 =100, d 1 (2) is 5, b 1 (2) is 20, a 1 (2) is 50, then the number of unprocessed messages in the message proxy server at time slot 3 is 125.

[0041] In some other embodiments of the present application, in the above method, the construction of the virtual queue model includes: obtaining a first virtual queue impact factor based on a first indicator function and the number of messages successfully transmitted at the target time slot and processed by the message proxy server; obtaining a second virtual queue impact factor based on a second indicator function and the maximum value of the queue service capacity of the target terminal; processing the first virtual queue impact factor, the second virtual queue impact factor, the number of lost messages during message transmission, and the virtual queue length of the target terminal at the target time slot to obtain an intermediate virtual queue length; and determining the maximum value of the intermediate virtual queue length and a preset value as the virtual queue length of the target terminal at the next time slot of the target time slot.

[0042] The first virtual queue impact factor can be obtained based on the first indicator function and the number of messages successfully transmitted in the target time slot and processed by the message proxy server; the second virtual queue impact factor can be obtained based on the second indicator function and the maximum value of the queue service capacity of the target terminal. The first virtual queue impact factor and the second virtual queue impact factor indicate that the virtual queue model is affected by the service rate and the packet loss rate.

[0043] Then, the first virtual queue impact factor, the second virtual queue impact factor, the number of lost messages during message transmission, and the virtual queue length of the target terminal at the target time slot are added together to obtain the intermediate virtual queue length; if the intermediate virtual queue length is greater than the preset value, the virtual queue length of the target terminal at the next time slot of the target time slot is the intermediate virtual queue length; if the intermediate virtual queue length is equal to the preset value, the virtual queue length of the target terminal at the next time slot of the target time slot is the preset value.

[0044] Specifically, in some embodiments, the virtual queue length at the next time slot of the target time slot may be determined according to the following formula (2):

[0045]

[0046] Among them, ∈ k is a constant greater than 0, is the first indicator function, indicating that when Q k When (t)>0, the value of the indicator function is 1; otherwise, it is 0. is the second indicator function, indicating that when Q k When (t)=0, the indicator function is 1; otherwise, it is 0. is the maximum value of the k-th client queue service capacity. For example, Q k (t)>0,Z k (t) is 50, b k (t) is 20, dk (t) is 9, is 30,∈ k is 1, then the virtual queue length of the target terminal in the next time slot of the target time slot is 20.

[0047] Step S102: construct a message processing delay constraint model of the Internet of Things service system according to the message queue model and the virtual queue model.

[0048] For an IoT service system, if there is no system delay constraint, there will be a situation where a message arrives at time t and is not processed, resulting in a backlog of messages, which will cause the IoT service system to crash. Therefore, a message processing delay constraint model for the IoT service system can be constructed to ensure the stability of the system.

[0049] Specifically, in some embodiments of the present application, in the above method, the message processing delay is a plurality of message processing time slots; the message processing delay constraint model of the Internet of Things service system is constructed according to the message queue model and the virtual queue model, including: obtaining the virtual queue length on the next message processing time slot of the target message processing time slot based on the virtual queue length on the target message processing time slot, the number of messages transmitted on the target message time slot and processed by the message proxy server, and the number of messages lost during the message transmission process on the target message time slot; determining the inequality relationship between the sum of the number of messages transmitted and processed by the message proxy server on each of the message processing time slots and the number of messages lost during the message transmission process on each of the message processing time slots, and the number of messages arriving at the first message processing time slot; establishing a message processing delay constraint model for the Internet of Things service system based on the finite upper bound of the message queue model and the finite upper bound of the virtual queue model, the virtual queue length on the next message processing time slot and the inequality relationship; wherein the message processing delay constraint model is used to characterize the inequality relationship between multiple message processing time slots, the message queue model and the virtual queue model.

[0050] It should be noted that for any time slot t, the number of messages sent from the kth terminal in the IoT service system to the message proxy server is a k (t), these messages will be processed in time slot t+1 at the earliest. In order to ensure that each message is processed within the maximum system delay, the maximum system delay can be set to time slots, i.e. these messages will be is processed within a time slot.

[0051] Based on the virtual queue length of the target message processing time slot, the number of messages that have been transmitted and processed by the message proxy server at the target message time slot, and the number of messages lost during the message transmission process at the target message time slot, the virtual queue length of the next message processing time slot of the target message processing time slot is obtained. Among them, the target message processing time slot is the time slot t+1 to the time slot Specifically, in some embodiments, for the time slots from time slot t+1 to time slot For all time slots τ within the time slot, there is at least one message sent to the message broker server at time slot t that has not been processed, so there must be Q τ >0, that is, for any The virtual queue length at the next message processing time slot of the target message processing time slot can be determined according to the following formula (3):

[0052] Z k (τ+1)=max[Z k (τ)+∈ k -b k (τ)-d k (τ), 0] formula (3);

[0053] Among them, Z k (τ) is the virtual queue length on the target message processing time slot; b k (τ) is the number of messages that have been transmitted and processed by the message proxy server at the target message time slot; d k (τ) is the number of messages lost during message transmission at the target message time slot.

[0054] According to the first-come, first-served principle in the MQTT protocol, a message arriving at the message queue at time slot t needs to be queued in Q k (t+1) messages can be served before it can be served. Since all messages arriving at time slot t must be served Therefore, we can get the inequality between the number of messages that have been transmitted and processed by the message proxy server at each message processing time slot, the sum of the number of messages lost during the message transmission process at each message processing time slot, and the number of messages that arrived at the first message processing time slot (4):

[0055]

[0056] Assume that for any given algorithm, there is a set of inequalities (5) at any time slot:

[0057]

[0058] in, It is the finite upper bound of the message queue model; is the finite upper bound of the virtual queue model.

[0059] Then, based on formulas (3), (4), and (5), that is, based on the finite upper bound of the message queue model and the finite upper bound of the virtual queue model, the virtual queue length on the next message processing time slot, and the inequality relationship, a message processing delay constraint model of the Internet of Things service system can be established. Specifically, in some embodiments, the message processing delay constraint model of the Internet of Things service system can be determined according to the following inequality (6):

[0060]

[0061] From inequality (6), we can see that the message processing delay constraint model of the IoT service system is used to characterize the inequality relationship between multiple message processing time slots, the message queue model and the virtual queue model.

[0062] Step S103: Under the condition that the message processing delay constraint model is satisfied, a Lyapunov drift penalty function is constructed, and a system stability threshold of the Internet of Things service system is set.

[0063] The Internet of Things service system satisfies the message processing delay constraint model, which can ensure the basic stability of the Internet of Things service system. On this basis, based on the message queue model and virtual queue model obtained in step S101, a Lyapunov drift penalty function can be constructed, and a system stability threshold of the Internet of Things service system can be set.

[0064] Specifically, in some embodiments of the present application, in the above method, under the condition of satisfying the message processing delay constraint model, a Lyapunov drift penalty function is constructed, including: for any terminal of the Internet of Things service system, the square of the message queue model and the square of the virtual queue model corresponding to the terminal are added to obtain the intermediate energy function corresponding to the terminal; the intermediate energy functions corresponding to each of the terminals are accumulated to obtain the energy function corresponding to the Internet of Things service system; the difference between the energy function at the next time slot of the target time slot and the energy function at the target time slot is determined as the energy change function corresponding to the Internet of Things service system; the energy change function and the preset penalty function constitute the Lyapunov drift penalty function.

[0065] If there are terminals 1, 2 and 3 in the Internet of Things service system, for terminal 1, the square of the message queue model 1 and the square of the virtual queue model 1 corresponding to terminal 1 are added together to obtain the intermediate energy function 1 corresponding to terminal 1; for terminal 2, the square of the message queue model 2 and the square of the virtual queue model 2 corresponding to terminal 2 are added together to obtain the intermediate energy function 2 corresponding to terminal 2; for terminal 3, the square of the message queue model 3 and the square of the virtual queue model 3 corresponding to terminal 3 are added together to obtain the intermediate energy function 3 corresponding to terminal 3. Add the intermediate energy function 1, the intermediate energy function 2 and the intermediate energy function 3 together to obtain the energy function 1 corresponding to the Internet of Things service system at time slot t. Similarly, the energy function 2 corresponding to the Internet of Things service system at time slot t+1 can be obtained, and the energy function 1 is subtracted from the energy function 2 to obtain the energy change function corresponding to the Internet of Things service system; then the sum of the energy change function and the preset penalty function is determined as the Lyapunov drift penalty function.

[0066] Specifically, in some embodiments, the energy function corresponding to the Internet of Things service system at time slot t can be determined according to the following formula (7):

[0067]

[0068] Where N is the number of terminals in the IoT service system.

[0069] The energy change function corresponding to the IoT service system can be determined according to the following formula (8):

[0070] ΔL(t)=L(t+1)-L(t) Formula (8);

[0071] In order to minimize the message transmission delay while making the system stable, a penalty function is added to the energy change function ΔL(t). The Lyapunov drift penalty function can be determined according to the following formula (9):

[0072] ∈(t)=ΔL(t)+V*p(t) Formula (9);

[0073] Where p(t) is the average delay in the target time slot.

[0074] According to Lyapunov's stability theorem and the concept of Lyapunov's second method, when ΔL(t) is stable within the preset range, the energy of the system can reach a stable state. Therefore, the system stability threshold of the IoT service system can be determined first, that is, the preset range mentioned above, so as to ensure the stability of the IoT service system based on the preset range.

[0075] In some embodiments of the present application, in the above method, the system stability threshold of the Internet of Things service system can be determined based on the average delay information of the Internet of Things service system and the sum of the number of messages in all queues on the target time slot.

[0076] The system stability threshold of the Internet of Things service system can be determined based on the average delay information of the Internet of Things service system and the sum of the number of messages in the queues corresponding to all terminals at the target time slot. Specifically, the system stability threshold of the Internet of Things service system can be determined according to the following formula (10):

[0077] γ=B+Vp * -εf(θ(t)) Equation (10);

[0078] Among them, the values ​​of B, V and ε are preset values, which are determined according to experimental feedback. p* is a preset value, which represents the average delay of the IoT service system under ideal conditions. f(θ(t)) is the sum of the number of messages in the queues corresponding to all terminals at time slot t.

[0079] Step S104: determining the system state of the target time slot based on the set system stability threshold and the Lyapunov drift penalty function.

[0080] Based on the set system stability threshold and Lyapunov drift penalty function, the system state of the target time slot is determined. For example, in some embodiments, if the set system stability threshold is M, at time slot t, the Lyapunov drift penalty function value corresponding to the Internet of Things service system is N, where M and N are real numbers greater than 0, and M>N, then it can be determined that the system state of the target time slot is a stable state.

[0081] Step S105: adjusting the IoT message service quality level based on the system status of the target time slot.

[0082] Based on the system state of the target time slot, the quality level of the IoT message service is adjusted. Specifically, in some embodiments, if the IoT service system includes terminal A, terminal B, and terminal C, based on the system state of the target time slot, the quality level of the message service of terminal A in the IoT service system can be adjusted, and the quality levels of the message services of terminals A, terminal B, and terminal C in the IoT service system can also be adjusted.

[0083] from Figure 1It can be seen from the method shown that the present application constructs a message queue model and a virtual queue model; since the virtual queue model can be used to constrain the maximum delay of the Internet of Things service system, the message processing delay constraint model of the Internet of Things service system constructed according to the message queue model and the virtual queue model can ensure that the messages in the message queue are processed within the maximum delay, thereby ensuring the basic stability of the Internet of Things service system. At the same time, the message queue model and the virtual queue model are used to construct the Lyapunov drift penalty function, and the system state of the Internet of Things service system is determined based on the relationship between the Lyapunov drift penalty function and the set system stability threshold; based on the system state, the quality level of the Internet of Things message service can be dynamically adjusted, so as to achieve the purpose of improving the service quality of the Internet of Things service system while ensuring the stability of the Internet of Things service system.

[0084] In some embodiments of the present application, in the above method, the system state of the target time slot is determined based on the set system stability threshold and the Lyapunov drift penalty function; based on the system state of the target time slot, the quality level of the Internet of Things message service is adjusted, including: if the Lyapunov drift penalty function value on the target time slot is greater than the system stability threshold, the system state of the target time slot is determined to be an unstable state; if the Lyapunov drift penalty function value on the target time slot is less than or equal to the system stability threshold, the system state of the target time slot is determined to be a stable state; based on the system state of the target time slot, the quality level of the Internet of Things message service is adjusted, including: if the system state of the target time slot is determined to be an unstable state, the quality level of the Internet of Things message service is lowered; if the system state of the target time slot is determined to be a stable state, the quality level of the Internet of Things message service is increased.

[0085] It should be noted that the MQTT protocol provides three levels of message service quality: QoS 0: The sending of messages depends on the capabilities of the underlying network. The sender sends the message at most once, and the message receiver does not send a response to the received message. QoS 1: The sender sends a message and waits for the receiver to respond. If the sender does not receive a response within the specified time, the message is sent again; the receiver can receive the message at least once, and may receive it repeatedly. QoS 2: The highest level of message service quality, which can ensure that the message is delivered to the receiver once and only once, and the sender and the receiver need to keep the message until receiving the response message from the other party.

[0086] If the Lyapunov drift penalty function value at the target time slot is greater than the system stability threshold, the system state of the target time slot is determined to be unstable; if the Lyapunov drift penalty function value at the target time slot is less than or equal to the system stability threshold, the system state of the target time slot is determined to be stable. If the system state of the target time slot is determined to be unstable, the quality level of the IoT message service is reduced; if the system state of the target time slot is determined to be stable, the quality level of the IoT message service is increased.

[0087] In some embodiments, if the overall quality level of the Internet of Things message service is QoS 1, the Lyapunov drift penalty function value at time slot t is 10, and the system stability threshold is 11, the system state at time slot t is determined to be a stable state, and the overall quality level of the Internet of Things message service can be improved to QoS 2. In other embodiments, if the overall quality level of the Internet of Things message service is QoS 2, the Lyapunov drift penalty function value at time slot t is 10, and the system stability threshold is 13, the system state at time slot t is determined to be an unstable state, and the overall quality level of the Internet of Things message service can be improved to QoS1.

[0088] In some embodiments, after the overall reduction of the IoT message service quality level, the Lyapunov drift penalty function value at the next time slot t+1 may be calculated. If the function value is still greater than the system stability threshold, the IoT message service quality level may be significantly reduced to ensure system stability. In other embodiments, after the overall improvement of the IoT message service quality level, the Lyapunov drift penalty function value at the next time slot t+1 may be calculated. If the function value is still less than the system stability threshold, the IoT message service quality level may continue to be improved.

[0089] Figure 2 A flowchart of a method for improving the quality of Internet of Things services according to another embodiment of the present application is provided. Figure 2 It can be seen that this embodiment includes steps S201 to S219:

[0090] Step S201: the number of lost messages during message transmission and the number of messages successfully transmitted and processed by the message proxy server constitute the first message number; the total number of messages transmitted by the target terminal to the message proxy server is the initial message number.

[0091] Step S202: subtract the number of unprocessed messages in the target time slot and the message proxy server from the first number of messages to obtain a second number of messages.

[0092] Step S203: Determine the maximum value of the second message quantity and 0 as the third message quantity.

[0093] Step S204: the sum of the third message quantity and the initial message quantity is determined as the number of unprocessed messages in the message proxy server at the next time slot of the target time slot.

[0094] Step S205: Obtain a first virtual queue impact factor based on the first indicator function and the number of messages that are successfully transmitted at the target time slot and processed by the message proxy server.

[0095] Step S206: obtaining a second virtual queue impact factor based on the second indicator function and the maximum value of the queue service capability of the target terminal.

[0096] Step S207: Add the first virtual queue impact factor, the second virtual queue impact factor, the number of lost messages during message transmission, and the virtual queue length of the target terminal at time slot t to obtain an intermediate virtual queue length.

[0097] Step S208: The maximum value of the intermediate virtual queue length and 0 is determined as the virtual queue length of the target terminal at time slot t+1.

[0098] Step S209: Under the condition that the message processing delay constraint model is satisfied, for any terminal of the Internet of Things service system, the square of the message queue model corresponding to the terminal and the square of the virtual queue model are added to obtain the intermediate energy function corresponding to the terminal.

[0099] Step S210: Accumulate the intermediate energy functions corresponding to each terminal to obtain the energy function corresponding to the Internet of Things service system.

[0100] Step S211: The difference between the energy function at the next time slot of the target time slot and the energy function at the target time slot is determined as the energy change function corresponding to the Internet of Things service system.

[0101] Step S212: The sum of the energy change function and the preset penalty function is determined as the Lyapunov drift penalty function.

[0102] Step S213: Determine a system stability threshold of the Internet of Things service system based on the average delay information of the Internet of Things service system and the sum of the number of messages in all queues at the target time slot.

[0103] Step S214: Determine whether the Lyapunov drift penalty function value on the target time slot is greater than the system stability threshold. If so, go to step S215; if not, go to step S216.

[0104] Step S215: Determine the system state of the target time slot as an unstable state.

[0105] Step S216: Determine the system state of the target time slot as a stable state.

[0106] Step S217: Determine whether the system state of the target time slot is an unstable state. If so, go to step S218; if not, go to step S219.

[0107] Step S218: Reduce the quality level of the IoT message service.

[0108] Step S219: Improve the quality level of IoT message service.

[0109] With the access of massive heterogeneous terminals in the power Internet of Things, the security of traditional border services is facing tremendous pressure, and the power Internet of Things terminals have become an important target and springboard for attacking the power grid. The types and protocols of the terminals connected are numerous, scattered, and have different communication methods, and the security threats are complex. At the same time, the scale of my country's power grid interconnection continues to expand, and the requirements for the measurement, collection, and processing of panoramic status information in power grid operation and control are constantly increasing. Especially after the strategic advancement of the power Internet of Things, the amount of power data will inevitably explode sharply, and the bottleneck problem of massive data fusion and processing needs to be solved urgently.

[0110] In the prior art, the Apriori improved algorithm based on memory decomposition can be used to mine large-scale data sets, but this method has the problem that the mining efficiency is seriously affected by the number of parallel processing nodes, and it cannot well avoid the problem of data consuming a large amount of memory. Therefore, this application proposes a data mining method to solve the above problems.

[0111] Specifically, in some embodiments of the present application, in the above method, the method also includes: obtaining the data to be processed in the message queue, sampling the data to be processed to obtain sampling group data; mining the sampling group data to obtain target mining information; using the target mining information to process the data to be processed to obtain target data.

[0112] Obtain the data to be processed in the message queue, sample the data to be processed to obtain sampled group data; mine the sampled group data to obtain target mining information; use the target mining information to process the data to be processed to obtain target data.

[0113] In some embodiments, the message queue may be first decapsulated to obtain the data to be processed, and then the target mining information may be used to process the data to be processed to obtain the target data, which may be transferred to a real-time database, Matlab, Xcelsius, Xhat or other related data formats as required. The data to be processed may be sampled to obtain sample group data, and the sample group data may be mined to obtain the target mining information.

[0114] First, the data to be processed is sampled to obtain sampling group data. Specifically, in some embodiments of the present application, the data to be processed is sampled to obtain sampling group data: including: randomly sampling the data to be processed to obtain multiple groups of group data; wherein each group of data includes multiple layers of data, and the attribute categories of multiple data in each layer of data are the same; and randomly selecting one group from the multiple groups of group data as the sampling group data.

[0115] The data to be processed are randomly sampled to obtain multiple groups of data; wherein each group of data includes multiple layers of data, and the attribute categories of multiple data in each layer of data are the same; and a group is randomly selected from the multiple groups of data as the sampling group data.

[0116] In some embodiments, 2 random sampling may be performed on the data to be processed 1, the data to be processed 2, the data to be processed 3, the data to be processed 4, the data to be processed 5, and the data to be processed 6 to obtain group data 1 and group data 2, wherein group data 1 includes: data to be processed 1, data to be processed 2, and data to be processed 4; group data 1 includes: data to be processed 3, data to be processed 5, and data to be processed 6. Group data 1 may be randomly selected as the sampled group data. Figure 3 FIG. 1 is a schematic diagram of the structure of a single group data according to an embodiment of the present application. Figure 3 As shown, a single group of data includes multiple layers of data: data layer 1, ..., data layer n, and the attribute categories of multiple data in each data layer are the same. For example, data layer 1 includes 4 attributes: voltage, current, power and frequency, and data layer 2 also includes the same 4 attributes: voltage, current, power and frequency.

[0117] Then, the sampling group data is mined to obtain target mining information. Specifically, in some embodiments of the present application, in the above method, the sampling group data is mined to obtain target mining information, including: constructing an initial data mining table and an initial mining formula based on multiple attribute data in the data to be processed; judging whether the attribute arrangement of the sampling group data satisfies the initial mining formula; if not, dividing the sampling group data into first sampling group data and second sampling group data, and generating a first data mining table and a first mining formula corresponding to the first sampling group data, and a second data mining table and a second mining formula corresponding to the second sampling group data, respectively; judging whether the attribute arrangement of the first sampling group data satisfies the first mining formula; and judging whether the attribute arrangement of the second sampling group data satisfies the second mining formula. In response to the target group data not satisfying the corresponding mining formula, the target group data is parsed to obtain the index information of the target group data and determine the target mining formula of the target group data; the initial mining formula, the target mining formula, the initial data mining table, the first data mining table, the second data mining table and the index information constitute the target mining information.

[0118] Based on multiple attribute data in the data to be processed, an initial data mining table and an initial mining formula are constructed. As shown in Table (1), in some embodiments, in the electric power field, the data to be processed is generated by electric power equipment, and electric power equipment 0, electric power equipment 1 and electric power equipment 2 correspond to 9 attributes respectively, so there are 27 attribute data in the data to be processed.

[0119] 0 1 2 3 4 5 6 7 8 0 Voltage Current Electric power … … … … … frequency 1 Voltage Current Electric power … … … … … null 2 Voltage Current Electric power … … … … … frequency

[0120] Table 1

[0121] Based on the above 27 attribute data, an initial data mining table is constructed. In some embodiments, the mining table can be set according to the position of the attribute in the first row relative to the first column, as shown in Table 2, where columns 1 to 9 in Table 2 are attribute data corresponding to power device 0; columns 10 to 17 are attribute data corresponding to power device 1; and columns 18 to 26 are attribute data corresponding to power device 2.

[0122]

[0123] Table 2

[0124] Then, an initial mining formula can be determined based on the initial data mining table. In some embodiments, the initial mining formula can be determined according to the following formula (11):

[0125] T = t + N × m Formula (11);

[0126] Among them, T is the index of the attribute set in the group data; t is the index of the attribute set in the initial mining table; N is the number of layers of layer data contained in the group data - 1; m is the number of attribute data in the layer data. For example, the initial mining formula corresponding to Table 2 is T = t + 18.

[0127] Then, it is determined whether the attribute arrangement of the sampling group data satisfies the initial mining formula. In some embodiments, for the first attribute "voltage", during verification, t=1, based on the initial mining formula, T=19, the data attribute at position 19 in the initial mining table is "current", then the data attribute "voltage" at position 19 in the verification group data does not correspond to the data attribute "voltage" at position 1 in the initial mining table, and it can be determined that the attribute arrangement of the sampling group data does not satisfy the initial mining formula.

[0128] If not satisfied, the sampling group data is divided into first sampling group data and second sampling group data, and a first data mining table and a first mining formula corresponding to the first sampling group data, and a second data mining table and a second mining formula corresponding to the second sampling group data are generated respectively. In some embodiments, the sampling group data in Table 1 can be divided into first sampling group data and second sampling group data. The first sampling group data includes multiple attribute data corresponding to power device 0 and power device 2, and a first data mining table corresponding to the first sampling group data is generated, as shown in Table 3. The first mining formula generated by the first data mining table is T=t+9; the second sampling group data includes multiple attribute data corresponding to power device 1, and a second data mining table corresponding to the second sampling group data is generated, as shown in Table 3.

[0129] As shown in Table 4, the second mining formula generated by the second data mining table is T=t.

[0130] Voltage Current Electric power … frequency Voltage Current Point Power … frequency 1 2 3 … 9 10 11 12 … 18

[0131] Table 3

[0132] Voltage Current Electric power … … 1 2 3 … 8

[0133] Table 4

[0134] Determine whether the attribute arrangement of the first sampling group data satisfies the first mining formula; and determine whether the attribute arrangement of the second sampling group data satisfies the second mining formula. In some embodiments, for the first attribute "voltage", when verifying, t=1, based on the first mining formula, T=10, the data attribute at position 10 in the first mining table is "voltage", then verify that the data attribute "voltage" at position 10 in the first sampling group data corresponds to the data attribute "voltage" at position 1 in the first mining table, then it can be determined that the attribute arrangement of the first sampling group data satisfies the first mining formula. At the same time, since the second sampling group lacks the attribute data "frequency", it can be determined that the attribute arrangement of the second sampling group data does not satisfy the second mining formula.

[0135] In response to the target group data not satisfying the corresponding mining formula, the target group data is parsed to obtain index information of the target group data and determine the target mining formula of the target group data. In some embodiments, the second sampling group data corresponding to Table 4 does not satisfy the corresponding second mining formula, and the second sampling group can be parsed to obtain index information of the second sampling group data and the target mining formula of the second group data.

[0136] The initial mining formula, the target mining formula, the initial data mining table, the first data mining table, the second data mining table and the index information constitute the target mining information.

[0137] In some embodiments of the present application, in the above method, the data to be processed includes multiple frames of data; the use of the target mining information to process the data to be processed to obtain target data includes: for multiple data in the data to be processed, storing them in a ring memory buffer in groups of a fixed number, and setting an initial data group; if the ring memory buffer overflows, storing the initial data group in an overflow file; if the overflow file is not empty, using the target mining information to mine at least one data group in the overflow file to obtain the target data; if the overflow file is empty, using the target mining information to mine at least one data group in the ring memory buffer to obtain the target data.

[0138] In some embodiments, before using the target mining information to process the data to be processed to obtain the target data, the Map-Reduce method can be used to divide the data to be processed, wherein the Map method maps the key-value pairs constructed by the data to be processed into a set of new key-value pairs, and the Reduce method is used to ensure that among all mapped key-value pairs, each one sharing the same key group is merged and summarized to output the final result.

[0139] For multiple data in the data to be processed, a fixed number of data are stored in a ring memory buffer as a group, and an initial data group is set; if the ring memory buffer overflows, the initial data group is stored in an overflow file; if the overflow file is not empty, the target mining information is used to mine at least one data group in the overflow file to obtain the target data; if the overflow file is empty, the target mining information is used to mine at least one data group in the ring memory buffer to obtain the target data. In other embodiments, for the data to be processed: data 1, data 2, ..., data 10, if the fixed number is 2, 2 data can be stored in the ring memory buffer as a group, and the unprocessed first group of data, that is, data group 1, is set as the initial data group. If the ring memory buffer can only store 4 groups of data, the initial data group, that is, the first group of data, can be stored in the overflow file, and the fifth group of data continues to be stored in the ring memory buffer. If the first data group exists in the overflow file, the first data group is mined according to the formula with reference to the mining table to obtain the target data; after the mining of the first data group is completed, the overflow file is empty, then the second data group, the third data group, the fourth data group and the fifth data group in the ring memory buffer can be mined in turn according to the formula with reference to the mining table to obtain the target data.

[0140] Figure 4 FIG. 1 is a flow chart of mining the data to be processed according to another embodiment of the present application. Figure 4 It can be seen that this embodiment includes:

[0141] Input the time slice size. Allocate time slices to the data group to be processed and assign them to the processor for mining. The time slice length should not be too short to reduce the overhead of process switching.

[0142] Input job information, including the identifier of the data group to be processed, arrival time and service time, where the identifier is randomly assigned by the Internet of Things service system; mining a set of data groups is a job.

[0143] Determine whether there are any remaining jobs. For example, you can determine whether the overflow file is empty and whether the ring memory buffer is empty. If both the overflow file and the ring memory buffer are empty, there are no remaining jobs; otherwise, there are remaining jobs.

[0144] If there are remaining jobs, multiple data groups are arranged according to the FCFS strategy to obtain a ready queue, and the first job of the ready queue is run. At the end of the time slice, it is determined whether the first job has been completed, that is, whether it is completed, and the above target mining information is used to perform mining operations on the data to be processed. If the operation is completed, the first job is removed from the ready queue and the initial data group is updated; if the operation is not completed, the first task is moved to the end of the ready queue, and then wait for a certain period of time to determine whether there are any remaining jobs.

[0145] If there are no remaining jobs, determine whether the memory has reached the limit. The mining data obtained after the first job is completed can be saved in the memory in the form of an array. If the memory reaches the limit, an interrupt task is sent to the ready queue, a process is arranged to jump out of the mining cycle, and the mined data is stored in the disk. If the memory does not reach the limit, wait for a certain period of time and determine again whether there are remaining jobs.

[0146] Figure 5 FIG. 1 is a flow chart of mining the data to be processed according to another embodiment of the present application. Figure 5 It can be seen that in this implementation, terminals such as PMU (power management unit) and RTU (terminal unit) send the data to be processed to the substation or data concentrator in real time, wherein the substation or data concentrator can be a multi-level or multi-route structure; the substation or data concentrator pre-processes the data to be processed, divides the data, and uses a mining algorithm to perform parallel mining, wherein parallel mining can achieve the purpose of load balancing; after data mining, the mined data in the memory can be transferred to the real-time database, Matlab, Xcelsius, Xhat and other related data formats according to needs.

[0147] It can be seen from the above embodiments that by sampling the data to be processed and verifying the mining table, the target mining information obtained can avoid cyclic identification of massive data, thereby improving the efficiency of data mining and reducing the memory burden.

[0148] Figure 6 A schematic diagram of a structure of an implementation device for improving the quality of Internet of Things services according to an embodiment of the present application, wherein the device 600 includes: a first construction unit 601, a second construction unit 602, a third construction unit 603, a determination unit 604, and an adjustment unit 605. Specifically:

[0149] The first construction unit 601 is used to construct a message queue model and a virtual queue model;

[0150] A second building unit 602 is used to establish a message processing delay constraint model of the Internet of Things service system according to the message queue model and the virtual queue model;

[0151] The third construction unit 603 is used to construct a Lyapunov drift penalty function and set a system stability threshold of the Internet of Things service system under the condition that the message processing delay constraint model is satisfied;

[0152] A determination unit 604 is used to determine the system state of the target time slot based on the set system stability threshold and the Lyapunov drift penalty function;

[0153] The adjusting unit 605 is configured to adjust the IoT message service quality level based on the system status of the target time slot.

[0154] In some embodiments of the present application, in the above-mentioned device, the first construction unit 601 is used for transmitting messages from the target terminal to the message proxy server in the target time slot, and the number of lost messages in the message transmission process and the number of messages successfully transmitted and processed by the message proxy server constitute a first message number; wherein the total number of messages transmitted by the target terminal to the message proxy server is the initial message number; the number of unprocessed messages in the target time slot and in the message proxy server is subtracted from the first message number to obtain a second message number; the maximum value of the second message number and the preset value is determined as the third message number; the sum of the third message number and the initial message number is determined as the number of unprocessed messages in the message proxy server at the next time slot of the target time slot.

[0155] In some embodiments of the present application, in the above-mentioned device, the first construction unit 601 is used to obtain a first virtual queue impact factor based on a first indication function and the number of messages successfully transmitted at the target time slot and processed by the message proxy server; obtain a second virtual queue impact factor based on a second indication function and the maximum value of the queue service capacity of the target terminal; add and process the first virtual queue impact factor, the second virtual queue impact factor, the number of lost messages during message transmission, and the virtual queue length of the target terminal at the target time slot to obtain an intermediate virtual queue length; and determine the maximum value of the intermediate virtual queue length and a preset value as the virtual queue length of the target terminal at the next time slot of the target time slot.

[0156] In some embodiments of the present application, in the above-mentioned device, the message processing delay is a plurality of message processing time slots; the second construction unit 602 is used to obtain the virtual queue length on the next message processing time slot of the target message processing time slot based on the virtual queue length on the target message processing time slot, the number of messages transmitted on the target message time slot and processed by the message proxy server, and the number of messages lost during the message transmission process on the target message time slot; determine the inequality relationship between the sum of the number of messages transmitted and processed by the message proxy server on each of the message processing time slots and the number of messages lost during the message transmission process on each of the message processing time slots, and the number of messages arriving at the first message processing time slot; establish a message processing delay constraint model for the Internet of Things service system based on the finite upper bound of the message queue model and the finite upper bound of the virtual queue model, the virtual queue length on the next message processing time slot and the inequality relationship; wherein the message processing delay constraint model is used to characterize the inequality relationship between multiple message processing time slots, the message queue model and the virtual queue model.

[0157] In some embodiments of the present application, in the above-mentioned device, the third construction unit 603 is used to, for any terminal of the Internet of Things service system, add the square of the message queue model and the square of the virtual queue model corresponding to the terminal to obtain the intermediate energy function corresponding to the terminal; accumulate the intermediate energy functions corresponding to each of the terminals to obtain the energy function corresponding to the Internet of Things service system; determine the difference between the energy function at the next time slot of the target time slot and the energy function at the target time slot as the energy change function corresponding to the Internet of Things service system; the energy change function and the preset penalty function constitute the Lyapunov drift penalty function.

[0158] In some embodiments of the present application, in the above-mentioned device, the third construction unit 603 is used to determine the system stability threshold of the Internet of Things service system based on the average delay information of the Internet of Things service system and the sum of the number of messages in all queues on the target time slot.

[0159] In some embodiments of the present application, in the above-mentioned device, the determination unit 604 is used to determine the system state of the target time slot as an unstable state if the Lyapunov drift penalty function value on the target time slot is greater than the system stability threshold; if the Lyapunov drift penalty function value on the target time slot is less than or equal to the system stability threshold, the system state of the target time slot is determined to be a stable state; the adjustment unit 605 is used to reduce the quality level of the Internet of Things message service if the system state of the target time slot is determined to be an unstable state; if the system state of the target time slot is determined to be a stable state, the quality level of the Internet of Things message service is increased.

[0160] In some embodiments of the present application, the device further includes: a sampling unit 610, a mining unit 611, and a processing unit 612. Specifically:

[0161] The sampling unit 610 is used to obtain the data to be processed in the message queue, sample the data to be processed, and obtain sample group data;

[0162] A mining unit 611 is used to mine the sample group data to obtain target mining information;

[0163] The processing unit 612 is used to process the data to be processed by using the target mining information to obtain target data.

[0164] In some embodiments of the present application, in the above-mentioned device, the sampling unit 610 is used to randomly sample the data to be processed to obtain multiple groups of group data; wherein each group of data includes multiple layers of data, and the attribute categories of multiple data in each layer of data are the same; and a group is randomly selected from the multiple groups of group data as the sampling group data.

[0165] In some embodiments of the present application, in the above-mentioned device, the mining unit 611 is used to construct an initial data mining table and an initial mining formula based on multiple attribute data in the data to be processed; determine whether the attribute arrangement of the sampling group data satisfies the initial mining formula; if not, divide the sampling group data into first sampling group data and second sampling group data, and generate a first data mining table and a first mining formula corresponding to the first sampling group data, and a second data mining table and a second mining formula corresponding to the second sampling group data, respectively; determine whether the attribute arrangement of the first sampling group data satisfies the first mining formula; and determine whether the attribute arrangement of the second sampling group data satisfies the second mining formula. In response to the target group data not satisfying the corresponding mining formula, the target group data is parsed to obtain the index information of the target group data and determine the target mining formula of the target group data; the initial mining formula, the target mining formula, the initial data mining table, the first data mining table, the second data mining table and the index information constitute the target mining information.

[0166] In some embodiments of the present application, in the above-mentioned device, the processing unit 612 is used to store multiple data in the data to be processed in a ring memory buffer in a group of a fixed number, and set an initial data group; if the ring memory buffer overflows, the initial data group is stored in an overflow file; if the overflow file is not empty, the target mining information is used to mine at least one data group in the overflow file to obtain the target data; if the overflow file is empty, the target mining information is used to mine at least one data group in the ring memory buffer to obtain the target data.

[0167] It should be noted that any of the above-mentioned devices for improving the service quality of the Internet of Things can implement the above-mentioned methods for improving the service quality of the Internet of Things in a one-to-one correspondence manner, which will not be repeated here.

[0168] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.

[0169] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0170] The memory is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory may include internal memory and non-volatile memory, and provide instructions and data to the processor.

[0171] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an implementation device for improving the quality of IoT services at the logical level. The processor executes the program stored in the memory and is specifically used to execute the above method.

[0172] The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor to be executed. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0173] The electronic device can execute the implementation method for improving the service quality of the Internet of Things provided by multiple embodiments of the present application, and realize the implementation device for improving the service quality of the Internet of Things. Figure 6 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.

[0174] An embodiment of the present application also proposes a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by an electronic device including multiple application programs, the electronic device can execute the implementation method of improving the quality of Internet of Things services provided by multiple embodiments of the present application.

[0175] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0176] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0177] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0178] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0179] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0180] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0181] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0182] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.

[0183] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0184] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for improving the quality of Internet of Things services, characterized in that: include: Construct message queue model and virtual queue model; According to the message queue model and the virtual queue model, a message processing delay constraint model of the Internet of Things service system is constructed; Under the condition that the message processing delay constraint model is satisfied, a Lyapunov drift penalty function is constructed, and a system stability threshold of the Internet of Things service system is set; Determine the system state of the target time slot based on the set system stability threshold and the Lyapunov drift penalty function; Adjusting the IoT message service quality level based on the system status of the target time slot; The building of the message queue model includes: In the target time slot, the target terminal transmits messages to the message proxy server, the number of lost messages during the message transmission process, and the number of messages successfully transmitted and processed by the message proxy server constitute a first message number; wherein the total number of messages transmitted by the target terminal to the message proxy server is the initial message number; Subtracting the number of unprocessed messages in the target time slot and the message proxy server from the first number of messages to obtain a second number of messages; Determine the maximum value of the second message quantity and a preset value as the third message quantity; Determine the sum of the third message quantity and the initial message quantity as the number of unprocessed messages in the message proxy server at the next time slot of the target time slot; The construction of the virtual queue model includes: Obtaining a first virtual queue impact factor based on a first indicator function and the number of messages successfully transmitted at the target time slot and processed by the message proxy server; Obtaining a second virtual queue impact factor based on a maximum value of the second indicator function and the queue service capability of the target terminal; The first virtual queue impact factor, the second virtual queue impact factor, the number of lost messages during message transmission, and the virtual queue length of the target terminal at the target time slot are processed to obtain an intermediate virtual queue length; Determine the maximum value between the intermediate virtual queue length and the preset value as the virtual queue length of the target terminal in the next time slot of the target time slot; The message processing delay is a plurality of message processing time slots; the message processing delay constraint model of the Internet of Things service system is established according to the message queue model and the virtual queue model, including: Based on the virtual queue length on the target message processing time slot, the number of messages transmitted and processed by the message proxy server on the target message time slot, and the number of messages lost during the message transmission process on the target message time slot, the virtual queue length on the next message processing time slot of the target message processing time slot is obtained; Determine the inequality relationship between the number of messages transmitted and processed by the message proxy server at each message processing time slot, the sum of the number of messages lost during message transmission at each message processing time slot, and the number of messages arriving at the first message processing time slot; Based on the finite upper bound of the message queue model and the finite upper bound of the virtual queue model, the virtual queue length on the next message processing time slot and the inequality relationship, a message processing delay constraint model of the Internet of Things service system is established; wherein the message processing delay constraint model is used to characterize the inequality relationship between multiple message processing time slots, the message queue model and the virtual queue model; The constructing of a Lyapunov drift penalty function under the condition of satisfying the message processing delay constraint model comprises: For any terminal of the Internet of Things service system, add the square of the message queue model and the square of the virtual queue model corresponding to the terminal to obtain the intermediate energy function corresponding to the terminal; Accumulating the intermediate energy functions corresponding to the terminals to obtain the energy function corresponding to the Internet of Things service system; Determine the difference between the energy function at the next time slot of the target time slot and the energy function at the target time slot as the energy change function corresponding to the Internet of Things service system; The energy change function and the preset penalty function constitute the Lyapunov drift penalty function; The step of setting a system stability threshold of the Internet of Things service system under the condition that the message processing delay constraint model is satisfied includes: Determine a system stability threshold of the Internet of Things service system based on the average delay information of the Internet of Things service system and the sum of the number of messages in all queues at the target time slot; The determining of the system state of the target time slot based on the set system stability threshold and the Lyapunov drift penalty function; and adjusting the quality level of the Internet of Things message service based on the system state of the target time slot include: If the Lyapunov drift penalty function value at the target time slot is greater than the system stability threshold, the system state of the target time slot is determined to be an unstable state; If the Lyapunov drift penalty function value at the target time slot is less than or equal to the system stability threshold, the system state of the target time slot is determined to be a stable state; The adjusting the Internet of Things message service quality level based on the system state of the target time slot includes: If the system state of the target time slot is determined to be an unstable state, lowering the quality level of the IoT message service; If the system state of the target time slot is determined to be a stable state, the quality level of the Internet of Things message service is improved.

2. The method for improving the service quality of the Internet of Things according to claim 1, characterized in that: The method further comprises: Acquire the data to be processed in the message queue, sample the data to be processed, and obtain sample group data; Mining the sampling group data to obtain target mining information; The target mining information is used to process the data to be processed to obtain target data.

3. The method for improving the service quality of the Internet of Things according to claim 2, characterized in that: The sampling of the data to be processed to obtain the sample group data includes: Randomly sampling the data to be processed to obtain multiple groups of data; wherein each group of data includes multiple layers of data, and the attribute categories of multiple data in each layer of data are the same; A group is randomly selected from the multiple groups of group data as sampling group data.

4. The method for improving the service quality of the Internet of Things according to claim 2, characterized in that: The mining of the sampling group data to obtain target mining information includes: Based on the multiple attribute data in the data to be processed, construct an initial data mining table and an initial mining formula; Determining whether the attribute arrangement of the sampling group data satisfies the initial mining formula; If not, the sampling group data is divided into first sampling group data and second sampling group data, and a first data mining table and a first mining formula corresponding to the first sampling group data, and a second data mining table and a second mining formula corresponding to the second sampling group data are generated respectively; determining whether the attribute arrangement of the first sampling group data satisfies the first mining formula; and determining whether the attribute arrangement of the second sampling group data satisfies the second mining formula, In response to the target group data not satisfying the corresponding mining formula, parsing the target group data to obtain index information of the target group data and determining a target mining formula for the target group data; The initial mining formula, the target mining formula, the initial data mining table, the first data mining table, the second data mining table and the index information constitute the target mining information.

5. The method for improving the quality of Internet of Things services according to claim 2, characterized in that: The data to be processed includes multiple frames of data; the process of processing the data to be processed using the target mining information to obtain target data includes: For the plurality of data in the data to be processed, a fixed number of data are stored in a ring memory buffer as a group, and an initial data group is set; If the ring memory buffer overflows, storing the initial data group in an overflow file; If the overflow file is not empty, mining at least one data group in the overflow file using the target mining information to obtain the target data; If the overflow file is empty, the target mining information is used to mine at least one data group in the ring memory buffer to obtain the target data.

6. A device for improving the quality of Internet of Things services, characterized in that: include: A first construction unit is used to construct a message queue model and a virtual queue model; A second construction unit is used to establish a message processing delay constraint model of the Internet of Things service system according to the message queue model and the virtual queue model; A third construction unit is used to construct a Lyapunov drift penalty function and set a system stability threshold of the Internet of Things service system under the condition that the message processing delay constraint model is satisfied; A determination unit, configured to determine a system state of a target time slot based on a set system stability threshold and the Lyapunov drift penalty function; An adjustment unit, configured to adjust the quality level of the IoT message service based on the system state of the target time slot; The first construction unit is used for transmitting messages from the target terminal to the message proxy server in the target time slot, and the number of lost messages during the message transmission process and the number of messages successfully transmitted and processed by the message proxy server constitute a first message number; wherein the total number of messages transmitted by the target terminal to the message proxy server is the initial message number; the number of unprocessed messages in the message proxy server in the target time slot is subtracted from the first message number to obtain a second message number; the maximum value of the second message number and a preset value is determined as a third message number; the sum of the third message number and the initial message number is determined as the number of unprocessed messages in the message proxy server at the next time slot of the target time slot; The first construction unit is used to obtain a first virtual queue impact factor based on a first indicator function and the number of messages successfully transmitted at the target time slot and processed by the message proxy server; obtain a second virtual queue impact factor based on a second indicator function and the maximum value of the queue service capacity of the target terminal; perform processing on the first virtual queue impact factor, the second virtual queue impact factor, the number of lost messages during message transmission, and the virtual queue length of the target terminal at the target time slot to obtain an intermediate virtual queue length; determine the maximum value of the intermediate virtual queue length and a preset value as the virtual queue length of the target terminal at the next time slot of the target time slot; The message processing delay is a plurality of message processing time slots; the second construction unit is used to obtain the virtual queue length on the next message processing time slot of the target message processing time slot based on the virtual queue length on the target message processing time slot, the number of messages transmitted on the target message time slot and processed by the message proxy server, and the number of messages lost during the message transmission process on the target message time slot; determine the inequality relationship between the sum of the number of messages transmitted and processed by the message proxy server on each of the message processing time slots and the number of messages lost during the message transmission process on each of the message processing time slots, and the number of messages arriving at the first message processing time slot; establish a message processing delay constraint model for the Internet of Things service system based on the finite upper bound of the message queue model and the finite upper bound of the virtual queue model, the virtual queue length on the next message processing time slot and the inequality relationship; wherein the message processing delay constraint model is used to characterize the inequality relationship between a plurality of the message processing time slots, the message queue model and the virtual queue model; The third construction unit is used for adding the square of the message queue model and the square of the virtual queue model corresponding to any terminal of the Internet of Things service system to obtain the intermediate energy function corresponding to the terminal; accumulating the intermediate energy functions corresponding to each of the terminals to obtain the energy function corresponding to the Internet of Things service system; determining the difference between the energy function at the next time slot of the target time slot and the energy function at the target time slot as the energy change function corresponding to the Internet of Things service system; the energy change function and the preset penalty function constitute the Lyapunov drift penalty function; The third construction unit is used to determine the system stability threshold of the Internet of Things service system based on the average delay information of the Internet of Things service system and the sum of the number of messages in all queues on the target time slot; The determination unit is used to determine the system state of the target time slot as an unstable state if the Lyapunov drift penalty function value on the target time slot is greater than the system stability threshold; if the Lyapunov drift penalty function value on the target time slot is less than or equal to the system stability threshold, the system state of the target time slot is determined to be a stable state; the adjustment unit is used to reduce the quality level of the Internet of Things message service if the system state of the target time slot is determined to be an unstable state; if the system state of the target time slot is determined to be a stable state, the quality level of the Internet of Things message service is increased.

7. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of any method described in claims 1 to 5 are performed.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are executed.

Citation Information

Patent Citations

  • A joint computing unloading method and device based on an energy collection technology

    CN109829332A

  • Task unloading system and method in vehicle fog calculation

    CN111800495A