Power terminal communication dynamic adjustment method and system based on MQTT server

Through the MQTT server, wireless connection is established in power terminal communication, the communication delay and bit error rate are analyzed, and the communication parameters are dynamically adjusted, which solves the communication adjustment problem of power terminals and improves communication quality and flexibility.

CN119996234APending Publication Date: 2025-05-13XJ ELECTRIC CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510103064.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art cannot communicate and adjust according to the transmission status of the power terminal, resulting in increased operation and maintenance difficulties.

Method used

Through the MQTT server, the control terminal establishes a wireless communication connection with the power terminal, uses the timestamp field in the reply message to analyze the communication delay, adjusts the issuance period of the polled message, and adjusts the communication quality service level according to the bit error rate.

Benefits of technology

It realizes real-time dynamic adjustment of communication speed and quality according to the communication status, avoids the occurrence of communication code errors and packet loss, reduces the system operation pressure, and improves the flexibility and scalability of communication connections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996234A_ABST
    Figure CN119996234A_ABST
Patent Text Reader

Abstract

The invention relates to a dynamic adjustment method and system for power terminal communication based on an MQTT server. A management and control terminal receives a reply message fed back by a power terminal in response to a polling message issued by the management and control terminal through the MQTT server; analyzing a timestamp field in the reply message, and prolonging the issuing period of issuing the polling message next time when the message communication delay is greater than the issuing period of the polling message; verifying the reply message, and when the verification fails and the bit error rate of the communication period to which the reply message belongs exceeds a preset bit error rate threshold value, in the communication period to which the reply message belongs, improving the communication transmission from the power terminal to the management and control terminal by a first-level quality service level on the basis of the basic quality service level; the communication transmission from the management and control terminal to the power terminal is improved by two quality service levels on the basis of the basic quality service level, real-time dynamic adjustment according to the communication state condition is achieved, and the phenomena of communication error codes, packet loss and the like are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a dynamic adjustment method and system for power terminal communication based on an MQTT server, and belongs to the field of power communication. Background Art

[0002] In the current power operation environment, substations and other key nodes are generally deployed with intelligent IoT power terminals based on the Modbus communication protocol, which can maintain the stability and safe operation of the power system through efficient data exchange and collaborative work. However, the traditional Modbus terminal interconnection method relies on wired network connection switches, requiring the IP addresses of all power terminals to be in the same network segment, which not only requires complex on-site engineering deployment, but also consumes a lot of manpower and material resources, and is costly.

[0003] In order to solve the above problems, new power terminals gradually support wireless interconnection solutions based on operator IoT cards. Specifically, by installing IoT cards with fixed IP addresses on each power terminal, these power terminals can access the operator's wireless network to achieve real-time communication and data exchange between different terminals. This wireless interconnection method greatly simplifies the on-site deployment process, reduces costs, and improves the flexibility and scalability of the system.

[0004] However, due to the accelerated construction of new power systems and the large-scale deployment of distributed IoT smart terminals, the complexity and uncertainty of the network environment are gradually increasing, and the number of connected power terminals is also increasing, making it difficult to regulate and manage multiple power terminals. It is even more impossible to adjust communications according to the transmission status of the power terminals, increasing the difficulty of operation and maintenance. Summary of the invention

[0005] The purpose of the present invention is to provide a method and system for dynamically adjusting power terminal communication based on an MQTT server, so as to solve the problem that the communication between the control terminal and the power terminal cannot be adjusted according to the transmission status of the power terminal.

[0006] To achieve the above-mentioned purpose, on the one hand, the solution of the present invention proposes a dynamic adjustment method for power terminal communication based on an MQTT server, wherein the control terminal establishes a wireless communication connection with the power terminal through the MQTT server, so that the control terminal receives a reply message fed back by the power terminal in response to a polling message sent by the control terminal; Parse the timestamp field in the reply message to obtain the message communication delay; when the message communication delay is greater than the sending period of the polling message, lengthen the sending period of the next polling message; The reply message is checked, and when the check fails and the bit error rate of the communication cycle to which the reply message belongs exceeds a preset bit error rate threshold, within the communication cycle to which the reply message belongs: the communication transmission from the power terminal to the control terminal is upgraded by one quality service level on the basis of the basic quality service level, so that the control terminal can successfully receive the reply message uploaded by the power terminal at least once; the communication transmission from the control terminal to the power terminal is upgraded by two quality service levels on the basis of the basic quality service level, so that the power terminal can receive the polling message sent by the control terminal only once.

[0007] Furthermore, the reply message is verified by the following steps: Perform CRC check calculation on the non-check code bytes in the reply message to obtain the CRC check code of the reply message; The CRC check code is compared with the check code byte in the reply message. If the comparison is consistent, the verification is successful and the reply message is parsed and stored; if the comparison is inconsistent, the verification fails.

[0008] Furthermore, a CRC check is performed on each reply message within the communication cycle; and based on the CRC check results of all reply messages, the bit error rate of the communication cycle is calculated.

[0009] Furthermore, the messages communicated between the power terminal and the control terminal include message keywords, and all received messages are classified according to the message keywords; Get the target communication protocol set on the MQTT server load; Based on the target communication protocol and message type, the messages communicated between the power terminal and the control terminal are parsed.

[0010] On the other hand, the present invention also proposes a dynamic adjustment system for power terminal communication based on an MQTT server, comprising an MQTT server, a control terminal and a power terminal, wherein the MQTT server, the control terminal and the power terminal are used to perform the following method steps: The control terminal establishes a wireless communication connection with the power terminal through the MQTT server, so that the control terminal receives a reply message fed back by the power terminal in response to the polling message sent by the control terminal; The timestamp field in the reply message is parsed to obtain the message communication delay; when the message communication delay is greater than the sending period of the polling message, the sending period of the next polling message is extended; the reply message is verified, and when the verification fails and the bit error rate of the communication period to which the reply message belongs exceeds a preset bit error rate threshold, within the communication period to which the reply message belongs: the communication transmission from the power terminal to the control terminal is upgraded by one level of quality service level on the basis of the basic quality service level, so that the control terminal can successfully receive the reply message uploaded by the power terminal at least once; the communication transmission from the control terminal to the power terminal is upgraded by two levels of quality service level on the basis of the basic quality service level, so that the power terminal can receive the polling message sent by the control terminal only once.

[0011] Furthermore, the reply message is verified by the following steps: Perform CRC check calculation on the non-check code bytes in the reply message to obtain the CRC check code of the reply message; The CRC check code is compared with the check code byte in the reply message. If the comparison is consistent, the verification is successful and the reply message is parsed and stored; if the comparison is inconsistent, the verification fails.

[0012] Furthermore, a CRC check is performed on each reply message within the communication cycle; and based on the CRC check results of all reply messages, the bit error rate of the communication cycle is calculated.

[0013] Furthermore, the messages communicated between the power terminal and the control terminal include message keywords, and all received messages are classified according to the message keywords; Get the target communication protocol set on the MQTT server load; Based on the target communication protocol and message type, the messages communicated between the power terminal and the control terminal are parsed.

[0014] The beneficial effects of the present invention are as follows: a wireless communication connection is established between the control terminal and the power terminal through the MQTT server, so that the control terminal receives the reply message fed back by the power terminal in response to the polling message sent by the control terminal; the timestamp field in the reply message is parsed to obtain the message communication delay; when the message communication delay is greater than the sending period of the polling message, the sending period of the next polling message is lengthened; the reply message is verified, and when the verification fails and the bit error rate of the communication period to which the reply message belongs exceeds the preset bit error rate threshold, within the communication period to which the reply message belongs: the communication transmission from the power terminal to the control terminal is upgraded to the first level of the basic quality service level, so that the control terminal at least Successfully receive a reply message uploaded by the power terminal; the communication transmission from the control terminal to the power terminal is upgraded by two levels on the basis of the basic quality service level, so that the power terminal only receives the polling message sent by the control terminal once, and uses the MQTT server to establish a wireless communication connection between the control terminal and the power terminal. Combined with the timestamp field analysis and the verification of the reply message, the polling message sending cycle between the control terminal and the power terminal and the communication transmission quality service level are adjusted to achieve real-time dynamic adjustment of the communication speed and quality according to the communication status, avoiding the occurrence of communication errors, packet loss and other phenomena, thereby effectively reducing the system operation pressure and improving the flexibility and scalability of the communication connection. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flow chart of a dynamic adjustment method of power terminal communication based on MQTT server proposed by the present invention; Figure 2 It is a schematic diagram of the connection relationship between the MQTT server, the control terminal and the power terminal in an actual application scenario of a dynamic adjustment method for power terminal communication based on an MQTT server proposed by the present invention. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0017] The inventive concept of the present invention is to cleverly use the MQTT server to establish a wireless communication connection between the control terminal and the power terminal, and use the analysis and verification of the timestamp field of the reply message and the calculation of the bit error rate of the communication cycle to understand the current communication status, and adjust the sending cycle and quality service level of the polling message according to the understanding situation, so as to achieve dynamic adjustment of the communication of the power terminal, facilitate the control and management of the power terminal, improve the communication quality, and effectively reduce the difficulty coefficient of operation and maintenance.

[0018] Method Example 1: like Figure 1 As shown, it is a flow chart of a dynamic adjustment method of power terminal communication based on MQTT server proposed by the present invention, which includes steps S11 to S13, specifically: In step S11, the control terminal establishes a wireless communication connection with the power terminal through the MQTT server, so that the control terminal receives a reply message fed back by the power terminal in response to a polling message sent by the control terminal.

[0019] Here, the MQTT (Message Queuing Telemetry Transport) is a "lightweight" message protocol based on the publish / subscribe paradigm, released by IBM. It works on the TCP / IP protocol family and is a publish / subscribe message protocol designed for remote devices with low hardware performance and poor network conditions; the MQTT server, also known as the MQTT message server (MQTT Broker), is the core component of the MQTT protocol, responsible for receiving network connections from clients, processing client subscription / unsubscription and message publishing requests, and forwarding messages published by clients to other subscribers. When both the control terminal and the power terminal are connected to the MQTT server, each terminal can subscribe to the topics it needs and publish its own message packets, which greatly reduces the difficulty of grid connection between communications and improves the flexibility and scalability of the system. The slave stations (power terminals) do not subscribe to each other or perform subscription management and control, and at the same time, the SIM cards of different network segments are used to divide the local area network, which can effectively perform security isolation. All slave stations are controlled by the dispatching master station (control terminal), and user permissions can be differentiated, which reduces the difficulty of operation and maintenance control and effectively reduces the consumption of manpower and material resources.

[0020] After establishing a wireless communication connection between the control terminal and the power terminal based on the MQTT server, the control terminal sends a polling message to the power terminal through the MQTT server; the power terminal uploads a reply message to the control terminal based on the MQTT server based on the polling message sent by the control terminal; in actual application scenarios, the power terminal connected to the control terminal by wireless communication may include multiple, such as Figure 2 As shown, it is a schematic diagram of the connection relationship between the MQTT server, the control terminal and the power terminal in an actual application scenario of a dynamic adjustment method of power terminal communication based on an MQTT server proposed by the present invention, wherein the control terminal (i.e., the master station) is wirelessly connected to multiple power terminals (i.e., slave stations) through the MQRR Broker server.

[0021] A timestamp field is also added to the effective load of the MQTT server. When the master station sends a normal polling message, the time when the slave station replies can be parsed from the received reply message, thereby calculating the message communication delay. Specifically: Step S12, parse the timestamp field in the reply message to obtain the message communication delay; when the message communication delay is greater than the sending period of the polling message, extend the sending period of the next polling message; here, the sending period is the time interval for the control terminal to send the polling message to the power terminal (for example, the first sending period is 100ms, when the control terminal sends the power terminal After the terminal sends the polling message, if the message communication delay of the power terminal uploading the reply message is 50ms, the second sending cycle is still 100ms; if the message communication delay of the power terminal uploading the reply message is 100ms, the second sending cycle is adjusted to 150ms), to realize the parsing of the time information in the message based on the MQTT server, and to extend the sending cycle of the polling message when the communication delay occurs, so as to dynamically adjust the sending speed of the message, thereby ensuring the accuracy of data analysis, avoiding packet loss, the master station misjudging it as a timeout and repeatedly sending messages, and even judging that the communication is interrupted.

[0022] Step S13, verifying the reply message, when the verification fails and the bit error rate of the communication cycle to which the reply message belongs exceeds the preset bit error rate threshold, within the communication cycle to which the reply message belongs: the communication transmission from the power terminal to the control terminal is upgraded by one level of quality service level on the basis of the basic quality service level, so that the control terminal can successfully receive the reply message uploaded by the power terminal at least once; the communication transmission from the control terminal to the power terminal is upgraded by two levels of quality service level on the basis of the basic quality service level, so that the power terminal only receives the polling message sent by the control terminal once, so as to achieve dynamic adjustment of the communication quality within the communication cycle.

[0023] It should be noted that the reply message is verified through the following steps: CRC check calculation is performed on the non-check code bytes in the reply message to obtain the CRC check code of the reply message; here, the CRC refers to the cyclic redundancy check code field that is the same as the RTU mode added to the effective load of the MQTT server, so as to verify and calculate the non-check code bytes in the reply message. The CRC check code is compared with the check code bytes in the reply message. If the comparison is consistent, the verification is successful, and the reply message is parsed and stored; if the comparison is inconsistent, the verification fails; in the actual application scenario, when the comparison is inconsistent, the corresponding reply message is determined as a discarded message, and it is processed as a packet loss, effectively avoiding the interference and influence of the discarded message on the communication transmission, and improving the reliability of the communication transmission. At the same time, CRC check will be performed on all reply messages in the entire communication cycle, and according to the CRC check result of each recovery message, the bit error rate of the communication cycle will be statistically calculated and calculated to prepare for the subsequent comparison between it and the bit error rate threshold.

[0024] At the same time, the communication cycle refers to the time interval used to count all message bit errors interacted within a certain time range, which can be set according to different polling message requirements or communication requirements; the quality service level refers to the QoS based on the MQTT server, which includes QoS, QoS1 and QoS2, wherein QoS (Quality of Service) is used to ensure the reliability and transmission efficiency of messages, and QoS is set as the basic quality service level in the present invention. To this end, in actual application scenarios, when the bit error rate exceeds a certain bit error rate threshold within a certain communication cycle, the communication transmission of the polling message of the telemetry and telesignaling of the power terminal (i.e., the slave station) is upgraded from QoS to QoS1 to ensure that the message on the power terminal side (sender) is successfully received at least once by the control terminal (receiver), and after the sender sends the message, the receiver (or agent) needs to confirm that the message has been received. In addition, the communication transmission of the polling message of the remote control and remote adjustment of the control terminal (i.e., the master station) is upgraded from QoS to QoS2 to ensure that the message is successfully received only once by the power terminal (receiver) to avoid duplication, and through the four-step handshake process (PUBREC, PUBREL, PUBCOMP), it is ensured that the message is only transmitted once. If confirmation is not received at any step, the sender and receiver will retry the corresponding steps until the entire confirmation process is completed. Among them, telemetry transmits the short-range measurement value of the object parameter to the distant measurement station to realize the technology of long-distance measurement; telesignaling is used to collect and transmit various operation and switch quantity information; remote control issues commands from the dispatcher to realize remote operation and switching; remote adjustment remotely debugs the remote control quantity equipment.

[0025] Through the above steps S11 to S13, the polling message sending cycle and the quality service level within the communication cycle are adjusted for the communication between the control terminal and the power terminal, so as to avoid packet loss, bit errors and the like in the messages exchanged between the control terminal and the power terminal during the communication process, thereby effectively improving the communication quality and efficiency between the control terminal and the power terminal.

[0026] Meanwhile, it should be noted that, in the present invention, there is no sequential execution order for step S12 and step S13, that is, step S12 and step S13 are executed in parallel.

[0027] Method Example 2: In a dynamic adjustment method for power terminal communication based on an MQTT server proposed by the present invention, The message communicated between the power terminal and the control terminal includes a message keyword, and all received messages are classified according to the message keyword; here, in the actual application scenario, the communication message also includes the device ID; according to the message keyword, the message message can be summarized as sending messages, receiving responses, connecting and disconnecting requests, request responses, etc. Obtain the target communication protocol set on the MQTT server load; here, the communication protocol refers to the protocol attached to the MQTT server load, which includes but is not limited to other power protocols such as mobbus protocol, 104 protocol, 103 protocol, 101 protocol, etc. Based on the target communication protocol and message type, the message communicated between the power terminal and the control terminal is parsed to achieve compatibility with multiple power protocols in the MQTT server, and the corresponding message is parsed for multiple power protocols, which expands the application scenarios during application and is conducive to the implementation of the dynamic adjustment method.

[0028] In a preferred embodiment of the present invention, first, a communication cycle of 1 hour is entered between the power terminal (slave station) and the control terminal (master station), and the master station and the slave station are wirelessly connected through the MQTT Broker server; preferably, the master station is only connected to one slave station on the MQTT server, and within the communication cycle of 1 hour, the master station sends a polling message to the slave station through the MQTT server when the sending cycle is 100ms, locally stores the sending time of the polling message, and waits for the slave station to reply; receives the reply message from the slave station, parses the timestamp field in the reply message, and obtains the message communication delay t0. Compare the communication delay t0 with the polling message sending period 100ms. If t0>100ms, it is preferred to delay 200ms on the basis of the sending period 100ms to extend the sending period of the next polling message of the master station, that is, the sending period of the next polling message is 300ms; and perform CRC check on each reply message in the communication period of 1h. Specifically, for the nth reply message within the communication period of 1h, perform CRC calculation on the non-check code bytes in the nth reply message. , get the CRC check code of the nth reply message; compare the CRC check code with the check code byte in the nth reply message to count the bit error rate of the communication cycle 1h (specifically: if the CRC check passes, the reply message is parsed and the parsed data is stored in the database; if the CRC check fails, the message is discarded, and the bit error rate of the communication cycle 1h is updated and counted). When the bit error rate of the communication cycle 1h exceeds the preset bit error rate threshold, the QoS of the subsequent reply messages of the nth reply message is adjusted. Based on the communication environment after the QoS adjustment, the reply message continues to be received within the communication cycle 1h, and the reply message is checked and the quality service level is adjusted until the next communication cycle is entered. Finally, the local message communication delay t0 and bit error rate and other information are cleared and reset to the default value.

[0029] System Example: On the other hand, the present invention also proposes a dynamic adjustment system for power terminal communication based on an MQTT server, including an MQTT server, a management and control terminal and a power terminal, wherein the power terminal can be one or two or more, which is not limited in the present invention. The MQTT server, the management and control terminal and the power terminal are used to perform the above-mentioned dynamic adjustment method for power terminal communication based on the MQTT server. Here, the introduction of the above-mentioned method in the embodiment is clear enough and will not be repeated here.

[0030] In summary, the present invention adds QoS and communication rate dynamic adjustment mechanism on the basis of traditional MQTT server, realizes convenient network planning and deployment by using the subscription and publishing mechanism of MQTT server, and adds key fields by using the scalability of MQTT message load, realizes dynamic adjustment mechanism, effectively reduces communication load and improves reliability. In other words, the effective load structure of MQTT in the present invention includes: timestamp, message, CRC check code, and this structure can effectively reduce the operation load and improve communication reliability.

[0031] It effectively solves the problems of low flexibility and poor scalability in the interconnection of power terminal communication networks, greatly reduces the overall construction cost, reduces the difficulty of solution design and implementation, and makes the construction of power terminal communication networks more efficient and convenient. Dynamic adjustment of communication rate and QoS mechanism can effectively reduce communication load and improve communication reliability. The MQTT service management mechanism that can distinguish and support user permissions can effectively improve the work quality and sales of operation and maintenance, and effectively promote the growth of the construction speed of power communication networks, bringing more considerable commercial value to the power industry. At the same time, the present invention can also be compatible with multiple communication protocols, ensure transparent transmission of protocols, and have good communication protocol compatibility and scalability, which brings great convenience to the power industry. At the same time, it also effectively reduces the research and development cost of smart power terminals, and further promotes the innovation and development of power communication technology.

Claims

1. A dynamic adjustment method for power terminal communication based on MQTT server, characterized in that: The control terminal establishes a wireless communication connection with the power terminal through the MQTT server, so that the control terminal receives a reply message fed back by the power terminal in response to the polling message sent by the control terminal; Parse the timestamp field in the reply message to obtain the message communication delay; When the message communication delay is greater than the sending period of the polling message, lengthen the sending period of the next polling message; Verify the reply message. When the verification fails and the bit error rate of the communication cycle to which the reply message belongs exceeds a preset bit error rate threshold, within the communication cycle to which the reply message belongs: the communication transmission from the power terminal to the control terminal is upgraded to a first-level quality service level on the basis of the basic quality service level, so that the control terminal successfully receives the reply message uploaded by the power terminal at least once; The communication transmission from the control terminal to the power terminal is upgraded by two levels of quality service level on the basis of the basic quality service level, so that the power terminal receives the polling message sent by the control terminal only once.

2. The method for dynamically adjusting power terminal communication based on MQTT server according to claim 1, characterized in that: Verify the reply message by following the steps below: Perform CRC check calculation on the non-check code bytes in the reply message to obtain the CRC check code of the reply message; The CRC check code is compared with the check code byte in the reply message. If the comparison is consistent, the verification is successful and the reply message is parsed and stored; if the comparison is inconsistent, the verification fails.

3. The method for dynamically adjusting power terminal communication based on MQTT server according to claim 2 is characterized in that: Perform CRC check on each reply message within the communication cycle; and calculate the bit error rate of the communication cycle based on the CRC check results of all reply messages.

4. The method for dynamically adjusting power terminal communication based on MQTT server according to claim 1, characterized in that: The messages communicated between the power terminal and the control terminal include message keywords, and all received messages are classified according to the message keywords; Get the target communication protocol set on the MQTT server load; Based on the target communication protocol and message type, the messages communicated between the power terminal and the control terminal are parsed.

5. A dynamic adjustment system for power terminal communication based on MQTT server, characterized in that: It includes an MQTT server, a control terminal and a power terminal, wherein the MQTT server, the control terminal and the power terminal are used to perform the following method steps: The control terminal establishes a wireless communication connection with the power terminal through the MQTT server, so that the control terminal receives a reply message fed back by the power terminal in response to the polling message sent by the control terminal; The timestamp field in the reply message is parsed to obtain the message communication delay; when the message communication delay is greater than the sending period of the polling message, the sending period of the next polling message is extended; the reply message is verified, and when the verification fails and the bit error rate of the communication period to which the reply message belongs exceeds a preset bit error rate threshold, within the communication period to which the reply message belongs: the communication transmission from the power terminal to the control terminal is upgraded by one level of quality service level on the basis of the basic quality service level, so that the control terminal can successfully receive the reply message uploaded by the power terminal at least once; the communication transmission from the control terminal to the power terminal is upgraded by two levels of quality service level on the basis of the basic quality service level, so that the power terminal can receive the polling message sent by the control terminal only once.

6. The dynamic adjustment system for power terminal communication based on MQTT server according to claim 5 is characterized in that: Verify the reply message by following the steps below: Perform CRC check calculation on the non-check code bytes in the reply message to obtain the CRC check code of the reply message; The CRC check code is compared with the check code byte in the reply message. If the comparison is consistent, the verification is successful and the reply message is parsed and stored; if the comparison is inconsistent, the verification fails.

7. The dynamic adjustment system for power terminal communication based on MQTT server according to claim 6 is characterized in that: Perform CRC check on each reply message within the communication cycle; and calculate the bit error rate of the communication cycle based on the CRC check results of all reply messages.

8. The dynamic adjustment system for power terminal communication based on MQTT server according to claim 5, characterized in that: The messages communicated between the power terminal and the control terminal include message keywords, and all received messages are classified according to the message keywords; Get the target communication protocol set on the MQTT server load; Based on the target communication protocol and message type, the messages communicated between the power terminal and the control terminal are parsed.