Non-periodic data transmission method for heating network control system and heating network control system
By utilizing the idle gaps in the bus to transmit non-periodic data frames and using preset flags to indicate data readiness in the heating network control system, the impact of non-periodic data transmission on bus load and the data length limitation problem are solved, achieving efficient asynchronous data acquisition and ensuring system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN THERMAL POWER RES INST CO LTD
- Filing Date
- 2026-03-27
- Publication Date
- 2026-05-26
Smart Images

Figure CN122093337A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of communication control, and in particular to a non-periodic data transmission method and a heating network control system for a heating network control system. Background Technology
[0002] In a heating network control system, the controller, as the core unit, is responsible for high-speed, periodic input / output data exchange with its numerous connected I / O cards to ensure real-time monitoring and stable operation of the production process. PROFIBUS-DP, a widely used fieldbus protocol, often integrates its master unit as a functional card into the heating network control system architecture, where it is managed by the controller.
[0003] In this architecture, the controller and the Profibus-DP master station not only need to exchange regular periodic I / O data, but also need to handle non-periodic data requests from the host computer software, such as DPV1 (Profibus DP-V1) commands for device parameter configuration, diagnosis, and monitoring. However, there are still certain drawbacks in implementing this non-periodic data transmission in the existing technology: Firstly, the controller and the cards it manages (including the Profibus-DP master station) typically communicate via a shared RS485 bus. To ensure system determinism and real-time performance, the controller polls all cards within its branch within a fixed communication cycle (e.g., 20ms), and the bus load is strictly planned and controlled. The transmission of non-periodic data from the DPV1 is an additional task; directly inserting it into the communication flow could easily consume excessive bus bandwidth, interfere with normal periodic communication, and even cause periodic tasks to time out, affecting system stability.
[0004] Secondly, the internal communication protocol between the controller and the card often sets an upper limit on the length of a single frame (e.g., 256 bytes). After deducting the overhead of the message header and trailer, the actual usable data segment length is limited (e.g., 216 bytes). The maximum length of a complete DPV1 aperiodic data message may exceed this limit (e.g., 256 bytes), causing a single frame to be unable to carry complete DPV1 data, and existing communication mechanisms cannot directly transmit ultra-long data.
[0005] Thirdly, in the communication between the controller and the Profibus-DP master, the controller is the master and the DP master is the slave, using a polling mode with master-slave interaction. After the DP master forwards a DPV1 command to its downstream DP slave, it needs to wait for the DP slave's reply, and this waiting time is uncertain. Since the DP master, as a slave device, does not have the ability to actively initiate communication with the controller, the controller cannot know in a timely manner when the DP slave's reply data is ready. If the controller uses frequent polling to check the reply status, it will greatly increase unnecessary bus load, contradicting the first challenge.
[0006] Therefore, a new technical solution is urgently needed to solve the data length limitation problem without affecting the real-time performance of the system's periodic communication, and to enable the controller to timely and efficiently recover the asynchronously returned DPV1 non-periodic data from the DP master station. Summary of the Invention
[0007] One objective of this application is to provide an aperiodic data transmission method for a heating network control system, aiming to solve the problems in the prior art where aperiodic data transmission has a large impact on bus load, is limited by the length of a single frame message, and is difficult to efficiently obtain asynchronous response data under a master-slave polling architecture.
[0008] In a first aspect, embodiments of this application provide a non-periodic data transmission method for a heating network control system, applied to a heating network control system including a controller and a master station, the method comprising: After a preset communication cycle of periodic data exchange with the master station ends, and during the communication gap before the start of the next periodic data exchange with another device on the same bus, the controller sends one or more segmented data frames containing non-periodic data requests to the master station. The master station receives and reassembles the one or more segmented data frames to obtain a complete aperiodic data request, and forwards the request to downstream devices to obtain aperiodic data responses; After receiving the aperiodic data reply, the master station, when replying to the controller with a periodic data message, indicates to the controller that it is ready to send the aperiodic data reply by changing the state of a preset flag bit in the periodic data message; The controller continuously parses the periodic data packets replied by the master station to detect the state change of the preset flag bit, and after detecting the state change, actively initiates a non-periodic data reading request to the master station during the communication gap period. In response to the read request, the master station sends one or more manually segmented data frames containing the non-periodic data response to the controller during the communication gap period. The controller receives and reassembles the one or more segmented data frames to obtain a complete aperiodic data response.
[0009] In conjunction with the first aspect, in one possible implementation, sending a data frame containing one or more segments of aperiodic data requests to the master station includes: Detect the length of the aperiodic data request; When the length of the aperiodic data request exceeds the data carrying length of a single frame, the controller encapsulates the aperiodic data request into multiple data frames in segments. It sets a function code in the header of each data frame to identify the start of the aperiodic data request transmission, a function code to identify an intermediate data frame in the transmission process, or a function code to identify the end of the transmission, and determines an incrementing frame sequence number so that the master station can reassemble the one or more segmented data frames.
[0010] In conjunction with the first aspect, in one possible implementation, when the length of the aperiodic data request does not exceed the data carrying capacity of a single frame, the controller encapsulates the complete aperiodic data request in a single data frame and places the function code used to identify the start of the aperiodic data request transmission along with an initial frame sequence number in the header of the data frame for transmission.
[0011] In conjunction with the first aspect, in one possible implementation, the master station receives and reassembles the one or more segmented data frames, including: Based on the master station, one or more data buffers are maintained, and the buffers have an idle state, a waiting state for subsequent data frames, and a data reception completed state. When the master station receives a data frame containing a start function code while the data buffer is in an idle state, it stores the data and switches to the waiting state for subsequent data frames. When the buffer is in a state of waiting for subsequent data frames, if a data frame containing an intermediate function code or an end function code is received, the data is appended and stored. Upon receiving a data frame containing the end function code, the system switches to the data reception complete state. If a data frame is received in an unexpected buffer state, a function code indicating a reception failure is sent back to the controller.
[0012] In conjunction with the first aspect, in one possible implementation, the state of the data buffer further includes: The request to read state is entered after the non-periodic data request has been fully received and forwarded to the downstream device; And the response ready state, after receiving the non-periodic data reply from the downstream device and storing it in the buffer, enters the response ready state and triggers the change of the preset flag state.
[0013] In conjunction with the first aspect, in one possible implementation, the master station sends one or more manually segmented data frames containing the aperiodic data response to the controller, including: When the length of the aperiodic data reply exceeds the data carrying capacity of a single frame, the master station encapsulates the aperiodic data reply into multiple data frames in segments. It also sets a function code in the header of each data frame to identify intermediate data frames during the aperiodic data reply transmission process or a function code to identify the end of transmission, and determines an incrementing frame sequence number so that the master station can reassemble the one or more segmented data frames.
[0014] In conjunction with the first aspect, in one possible implementation, the method further includes: If the controller fails to detect a change in the state of the preset flag bit in the periodic data message within a preset monitoring period after sending the non-periodic data request to the master station, it determines that the non-periodic data transmission has failed.
[0015] In a second aspect, embodiments of this application also propose a heating network control system, the system comprising: The controller is configured to: send a non-periodic data request to the master station during a communication gap between periodic communication with the master station and periodic communication with another device; continuously monitor a preset flag bit in the periodic data packets replied by the master station; and, after detecting a change in the status of the flag bit, actively initiate a data read request to the master station during the communication gap to obtain a non-periodic data reply. The master station is configured to: receive and process non-periodic data requests from the controller; forward the requests to downstream devices; after receiving a non-periodic data response from a downstream device, change the state of the preset flag bit in the periodic data message sent to the controller; and respond to a data read request initiated by the controller by sending the non-periodic data response during the communication gap period.
[0016] In conjunction with the second aspect, in one possible implementation, the controller is further configured to: When the length of a non-periodic data request to be sent exceeds the data carrying capacity of a single frame, the request is divided into multiple data segments, and a message header containing a function code and frame sequence number is added to each data segment so that multiple data frames can be sent in batches.
[0017] In conjunction with the second aspect, in one possible implementation, the main station further includes: The data buffer is configured to: reassemble the data frames sent by the controller in batches according to the function code and frame sequence number in the received data frames, and control the reception, forwarding and reply process of non-periodic data by managing multiple internal states of the data buffer.
[0018] The embodiments of this application can achieve the following technical effects: On the one hand, the embodiments of this application utilize the bus idle gap between periodic communication tasks in the heating network control system to transmit non-periodic data frames. Non-periodic communication is treated as a low-priority task and completed without occupying or interfering with the normal periodic communication time window. This ensures that the core real-time control task of the heating network control system is not affected in any way. While effectively transmitting non-periodic data, it greatly guarantees the stability and determinism of the system.
[0019] On the other hand, based on the embodiments of this application, the DP master station announces to the controller that non-periodic reply data is ready by changing a preset flag bit (DPV1_RES) in the periodic message header it replies to the controller, in a manner with zero additional bus overhead. Based on this, the controller only needs to monitor this flag bit to promptly obtain the status, avoiding a large number of inefficient polling operations for querying the status, significantly reducing unnecessary bus load, and realizing efficient asynchronous event notification under a strict master-slave architecture. Attached Figure Description
[0020] The accompanying drawings, which form part of this specification, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 A schematic diagram illustrating an application scenario of non-periodic data transmission in a heating network control system, provided as an embodiment of this application; Figure 2 A schematic flowchart illustrating a non-periodic data transmission method for a heating network control system provided in this application embodiment; Figure 3 This is a schematic diagram of the structure of a non-periodic data transmission device for a heating network control system provided in an embodiment of this application. Detailed Implementation
[0021] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0022] The following detailed description is exemplary and intended to provide further detailed explanation of the invention. Unless otherwise specified, all technical terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this invention is for describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention.
[0023] Please refer to Figure 1 The first embodiment of this application proposes a non-periodic data transmission method for a heating network control system. Figure 1 The diagram shown illustrates the process of this method, which is applied to a heating network control system. The heating network control system includes a controller and a master station. The method includes: Step S10: After a preset communication cycle of periodic data exchange with the master station ends, and during the communication gap before the start of the next periodic data exchange with another device on the same bus, the controller sends one or more segments of data frames containing non-periodic data requests to the master station. Specifically, in this embodiment, the step of the controller sending one or more segments of data frames containing aperiodic data requests to the master station includes: The length of the aperiodic data request is detected. When the length of the aperiodic data request exceeds the data carrying length of a single frame, the controller encapsulates the aperiodic data request into multiple data frames in segments. By setting a function code in the header of each data frame to identify the start of aperiodic data request transmission, a function code to identify an intermediate data frame in the transmission process, or a function code to identify the end of transmission, and simultaneously determining an incrementing frame sequence number, the master station reassembles the one or more segmented data frames.
[0024] Meanwhile, when the length of the aperiodic data request does not exceed the data carrying capacity of a single frame, the controller encapsulates the complete aperiodic data request in a single data frame and places the function code used to identify the start of the aperiodic data request transmission and an initial frame sequence number together in the header of the data frame for transmission.
[0025] As a specific implementation method, taking the PROFIBUS DP protocol as an example, the complete process of the above steps includes: In step A10, the host computer sends DPV1 aperiodic data to the controller via Ethernet and waits for the controller to reply with a message. Step A20: The controller receives the DPV1 aperiodic data sent by the host computer, determines the data length, and if the data length is less than or equal to the maximum length that a single frame message can accommodate, then all the DPV1 aperiodic data is filled into the data segment of the current frame message, and the frame sequence number field of the header is assigned the value 0, and the header function code field is assigned the value DPV1_ASK_START; if the data length is greater than the maximum length that a single frame message can accommodate, then the corresponding length of the DPV1 aperiodic data is taken according to the maximum length of the message data segment, the data segment of the current frame message is filled, and the frame sequence number field of the header is assigned the value 1, and the header function code field is assigned the value DPV1_ASK_START. In step A30, the controller waits for an opportunity to send a DPV1 aperiodic message to the DP master station via the RS485 bus. Specifically, the controller and all cards in the branch where the DP master station is located need to complete communication within one communication cycle (usually 20ms). Furthermore, for any card in that branch, the interval between two periodic communication cycles is also one communication cycle (usually 20ms). Therefore, the controller needs to send a DPV1 aperiodic message to the DP master station and receive a reply message from the DP master station during the gap between the end of the DP master station's periodic communication time and the beginning of the next card's periodic communication time. During each gap, the controller sends only one frame of the DPV1 aperiodic message to the DP master station.
[0026] Step A40: The controller waits for a reply message from the DP master station. After receiving the reply message from the DP master station, it retrieves the message function code. If the function code is not RECV_FAIL, it further determines the remaining length of the DPV1 aperiodic data. If the remaining length is greater than 0, it proceeds to step A50; otherwise, it proceeds to step A80. If the function code is RECV_FAIL, it is considered that there is a problem with the transmission of this DPV1 data, and it proceeds to step A70. Step A50: Determine the remaining length of DPV1 aperiodic data. If the remaining data length is less than or equal to the maximum length that a single frame can accommodate, fill the remaining DPV1 aperiodic data into the data segment of this frame, assign a value to the frame sequence number field of the header, which is the previous frame sequence number plus 1, and assign the message function code field to DPV1_ASK_END. If the data length is greater than the maximum length that a single frame can accommodate, take the corresponding length of the remaining DPV1 aperiodic data according to the maximum length of the frame data segment, fill the data segment of this frame, assign a value to the frame sequence number field of the header, which is the previous frame sequence number plus 1, and assign the message function code field to DPV1_ASK_PASS. Step A60, the controller proceeds to step A30; Step A70: The controller replies to the host computer via Ethernet with a DPV1 data transmission failure message; Step A80: The controller sends DPV1 aperiodic data to the DP master station, and the process ends. Step S20: The master station receives and reassembles the one or more segmented data frames to obtain a complete aperiodic data request, and forwards the request to the downstream device to obtain an aperiodic data response; Step S30: After receiving the aperiodic data reply, when replying to the controller with a periodic data message, the master station indicates to the controller that it is ready to send the aperiodic data reply by changing the state of the preset flag bit in the periodic data message. Step S40: The controller continuously parses the periodic data packets replied by the master station to detect the state change of the preset flag bit, and after detecting the state change, actively initiates a non-periodic data reading request to the master station during the communication gap period. Specifically, the main station receives and reassembles the one or more segmented data frames, including: Based on the master station, one or more data buffers are maintained. The buffers have an idle state, a waiting for subsequent data frames state, and a data reception completed state. When the master station receives a data frame containing a start function code while the data buffer is in the idle state, it stores the data and switches to the waiting for subsequent data frames state. When the buffer is in the waiting for subsequent data frames state and receives a data frame containing an intermediate function code or an end function code, it appends the data. When a data frame containing an end function code is received, it switches to the data reception completed state. If a data frame is received in an unexpected buffer state, a function code indicating reception failure is sent back to the controller.
[0027] The state of the data buffer also includes: The request to read state is entered after the non-periodic data request has been fully received and forwarded to the downstream device; And the response ready state, after receiving the non-periodic data reply from the downstream device and storing it in the buffer, enters the response ready state and triggers the change of the preset flag state.
[0028] Step S50: In response to the read request, the master station sends one or more manually segmented data frames containing the non-periodic data response to the controller during the communication gap period. Specifically, when the length of the aperiodic data reply exceeds the data carrying capacity of a single frame, the master station encapsulates the aperiodic data reply into multiple data frames in segments. It also sets a function code in the header of each data frame to identify intermediate data frames during the aperiodic data reply transmission process or a function code to identify the end of transmission, and determines an incrementing frame sequence number so that the master station can reassemble the one or more segmented data frames.
[0029] In step S60, the controller receives and reassembles the one or more segmented data frames to obtain a complete aperiodic data response.
[0030] Furthermore, if the controller fails to detect a change in the state of the preset flag bit in the periodic data message within a preset monitoring period after sending the non-periodic data request to the master station, it determines that the non-periodic data transmission has failed.
[0031] Similarly, taking the PROFIBUS DP protocol as an example, please refer to... Figure 2 , Figure 2 The flowchart illustrates the interaction process for non-periodic data transmission between the controller and the master station based on the PROFIBUS DP protocol.
[0032] Specifically, for the main station, its logic for receiving aperiodic data includes: When the DP master receives a DPV1 aperiodic message from the controller, it first sets the reply function code to RECV_OK, then retrieves the function code of the received message and processes it according to the function code value: If the function code is DPV1_ASK_START, then check the status of the DPV1 data buffer. If the buffer status is NULL, store the data in the DPV1 data buffer and set the buffer status to WAIT_ASK. Then check if the frame sequence number is 0. If it is 0, it means that the controller only sends one frame, and set the buffer status to ASK_OK. If the buffer status is not NULL, then set the reply controller message function code to RECV_FAIL. If the function code is DPV1_ASK_PASS, then check the status of the DPV1 data buffer. If the buffer status is WAIT_ASK, store the data in the buffer; if the buffer status is not WAIT_ASK, then set the reply message function code to RECV_FAIL. If the function code is DPV1_ASK_END, then check the status of the DPV1 data buffer. If the buffer status is WAIT_ASK, store the data in the buffer and set the buffer status to ASK_OK; if the buffer status is not WAIT_ASK, then set the reply message function code to RECV_FAIL. The DP master station replies to the controller via the RS485 bus; The DP master station determines the status of the DPV1 data buffer. If the buffer status is ASK_OK, it extracts DPV1 data from the DPV1 data receive buffer, sets the buffer status to ASK_READOUT, and sends the DPV1 data to the DP slave station according to the Profibus-DP protocol. If the buffer status is not ASK_OK, it waits to receive a message. If a message is received, it proceeds to step 1. If the wait times out (the timeout is set to 50 communication cycles, and one communication cycle is 20ms), it sets the buffer status to NULL and re-receives the non-periodic DPV1 message sent by the controller. The DP master station's DPV1 non-periodic data reception logic has ended.
[0033] For the main station, its logic for sending aperiodic data specifically includes: The DP master station follows the Profibus-DP protocol to wait for DPV1 data from the DP slave station. If it receives DPV1 data from the DP slave station, it checks whether the DPV1 buffer status is ASK_READOUT. If it is, it stores the data in the DPV1 buffer and sets the buffer status to ACK_OK. If not, it sets the buffer status to NULL. If it does not receive DPV1 data from the DP slave station within the timeout period, it sets the buffer status to NULL. The DP master station checks whether the DPV1 buffer status is ACK_OK. If it is, it sets the DPV1 reply flag to DPV1_DATA_OK. When the DP master station replies to the controller's periodic data request message, it checks whether the DPV1 reply identifier is DPV1_DATA_OK. If it is, it sets the DPV1_RES field in the reply message header to 1; otherwise, it sets the DPV1_RES field in the reply message header to 0. The DP master station waits for the controller's DPV1 data request message. If it receives the controller's DPV1 data request message, it checks whether the status of the DPV1 buffer is ACK_OK. If it is, it determines the data length. If the data length is less than or equal to the maximum length that a single frame message can hold, it fills the data segment of the current frame message with all the DPV1 aperiodic data, sets the frame sequence number field of the header to 0, and sets the header function code field to DPV1_ACK_END. If the data length is greater than the maximum length that a single frame message can hold, it takes the corresponding length of the DPV1 aperiodic data according to the maximum length of the message data segment, fills the data segment of the current frame message, sets the frame sequence number field of the header to 1, and sets the header function code field to DPV1_ACK_PASS. The DP master replies to the controller with a message. If there is still DPV1 data that has not been sent, it waits again for the controller's DPV1 data request message. Otherwise, the DP master sets the DPV1 buffer status to NULL. The non-periodic data transmission of DPV1 on the DP master station side has ended.
[0034] For the controller, its logic for receiving aperiodic data specifically includes: The controller continuously monitors whether the DPV1_RES field in the periodic data packet header of the DP master station is 1. If it is 1, it means that the DP master station has DPV1 data to send to the controller, and the controller waits for the opportunity to send a non-periodic DPV1 packet to the Profibus-DP master station via serial port. If it is not 1, the controller checks the monitoring time. If the monitoring time is less than or equal to the preset value (10s), it continues to wait. If the monitoring time is greater than the preset value, it determines that the non-periodic DPV1 data transmission has failed, replies to the host computer with a DPV1 non-periodic data transmission failure message, and the controller-side DPV1 non-periodic data reception ends. After receiving the Profibus-DP slave reply message, the controller first retrieves the function code and processes it according to the value of the function code: If the function code is DPV1_ACK_PASS, the data is stored in the DPV1 buffer and the system waits for the opportunity to send a DPV1 non-periodic message to the Profibus-DP master station via serial port. If the function code is DPV1_ACK_END, the data is stored in the DPV1 buffer, and the controller sends the received DPV1 data to the host computer. After that, the controller-side DPV1 non-periodic data reception ends.
[0035] A second embodiment of this application also proposes a heating network control system, the system comprising: The controller is configured to: send a non-periodic data request to the master station during a communication gap between periodic communication with the master station and periodic communication with another device; continuously monitor a preset flag bit in the periodic data packets replied by the master station; and, after detecting a change in the status of the flag bit, actively initiate a data read request to the master station during the communication gap to obtain a non-periodic data reply. The master station is configured to: receive and process non-periodic data requests from the controller; forward the requests to downstream devices; after receiving a non-periodic data response from a downstream device, change the state of the preset flag bit in the periodic data message sent to the controller; and respond to a data read request initiated by the controller by sending the non-periodic data response during the communication gap period.
[0036] As one possible implementation, the controller is further configured to: When the length of a non-periodic data request to be sent exceeds the data carrying capacity of a single frame, the request is divided into multiple data segments, and a message header containing a function code and frame sequence number is added to each data segment so that multiple data frames can be sent in batches.
[0037] As a possible implementation method, the main station also includes: The data buffer is configured to: reassemble the data frames sent by the controller in batches according to the function code and frame sequence number in the received data frames, and control the reception, forwarding and reply process of non-periodic data by managing multiple internal states of the data buffer.
[0038] For details on the specific implementation of this system, please refer to the above embodiments. This embodiment will not be repeated here.
[0039] As another aspect of the embodiments of this application, this application also provides an aperiodic data transmission device for a heating network control system. The aperiodic data transmission device for the heating network control system can be a software module, which includes several instructions stored in a memory. A processor can access the memory, call the instructions, and execute them to complete the aperiodic data transmission method for the heating network control system described in the above embodiments.
[0040] In some embodiments, the non-periodic data transmission device of the heating network control system can also be constructed from hardware devices. For example, the non-periodic data transmission device of the heating network control system can be constructed from one or more chips, which can work in coordination to complete the non-periodic data transmission method of the heating network control system described in the above embodiments. As another example, the non-periodic data transmission device of the heating network control system can also be constructed from various logic devices, such as general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), microcontrollers, ARM (Acorn RISC Machine) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
[0041] Further, see Figure 3 , Figure 3 This is a schematic diagram of the structure of a computer device according to an embodiment of this application. The computer device includes one or more processors 31 and a memory 32. The memory 32 is connected to one or more processors 31, for example, via a bus.
[0042] Processor 31 is configured to support the computer device in performing the corresponding functions in the methods described in the above method embodiments. Processor 31 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0043] Memory 32 is used to store program code, etc. Memory 32 may include volatile memory (VM), such as random access memory (RAM); memory 32 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 32 may also include combinations of the above types of memory.
[0044] The memory 32 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the non-periodic data transmission method of the heating network control system in this embodiment. The processor 31 executes various functional applications and data processing of the non-periodic data transmission method and the non-periodic data transmission device of the heating network control system by running the non-volatile software programs, instructions, and modules stored in the memory 32, thereby realizing the functions of the various modules or units of the non-periodic data transmission method and the non-periodic data transmission device of the heating network control system provided in the above method embodiments.
[0045] The memory 32 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function. The data storage area may store data created based on the use of the non-periodic data transmission device of the heating network control system. In some embodiments, the memory 32 may optionally include memory remotely located relative to the processor 31, which can be connected to the non-periodic data transmission device of the heating network control system via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0046] One or more modules are stored in memory 32. When executed by one or more processors 31, they perform the non-periodic data transmission method of the heating network control system in any of the above method embodiments. For example, they perform the method steps described in the above method embodiments to realize the functions of the modules described in the above device embodiments.
[0047] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method as described in the foregoing embodiments.
[0048] As is known from common technical knowledge, this invention can be implemented through other embodiments that do not depart from its spirit or essential characteristics. Therefore, the disclosed embodiments described above are merely illustrative in all respects and are not the only ones. All modifications within the scope of this invention or its equivalents are included in this invention.
[0049] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0050] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0051] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0052] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A non-periodic data transmission method for a heating network control system, applied to a heating network control system, the heating network control system comprising a controller and a master station, characterized in that, The method includes: After a preset communication cycle of periodic data exchange with the master station ends, and during the communication gap before the start of the next periodic data exchange with another device on the same bus, the controller sends one or more segmented data frames containing non-periodic data requests to the master station. The master station receives and reassembles the one or more segmented data frames to obtain a complete aperiodic data request, and forwards the request to downstream devices to obtain aperiodic data responses; After receiving the aperiodic data reply, the master station, when replying to the controller with a periodic data message, indicates to the controller that it is ready to send the aperiodic data reply by changing the state of a preset flag bit in the periodic data message; The controller continuously parses the periodic data packets replied by the master station to detect the state change of the preset flag bit, and after detecting the state change, actively initiates a non-periodic data reading request to the master station during the communication gap period. In response to the read request, the master station sends one or more manually segmented data frames containing the non-periodic data response to the controller during the communication gap period. The controller receives and reassembles the one or more segmented data frames to obtain a complete aperiodic data response.
2. The non-periodic data transmission method for a heating network control system according to claim 1, characterized in that, Sending one or more segmented data frames containing aperiodic data requests to the master station includes: Detect the length of the aperiodic data request; When the length of the aperiodic data request exceeds the data carrying length of a single frame, the controller encapsulates the aperiodic data request into multiple data frames in segments. It sets a function code in the header of each data frame to identify the start of the aperiodic data request transmission, a function code to identify an intermediate data frame in the transmission process, or a function code to identify the end of the transmission, and determines an incrementing frame sequence number so that the master station can reassemble the one or more segmented data frames.
3. The non-periodic data transmission method for a heating network control system according to claim 2, characterized in that, When the length of the aperiodic data request does not exceed the data carrying capacity of a single frame, the controller encapsulates the complete aperiodic data request in a single data frame and places the function code used to identify the start of the aperiodic data request transmission along with an initial frame sequence number in the header of the data frame for transmission.
4. The non-periodic data transmission method for a heating network control system according to claim 1, characterized in that, The master station receives and reassembles the one or more segmented data frames, including: Based on the master station, one or more data buffers are maintained, and the buffers have an idle state, a waiting state for subsequent data frames, and a data reception completed state. When the master station receives a data frame containing a start function code while the data buffer is in an idle state, it stores the data and switches to the waiting state for subsequent data frames. When the buffer is in a state of waiting for subsequent data frames, if a data frame containing an intermediate function code or an end function code is received, the data is appended and stored. Upon receiving a data frame containing the end function code, the system switches to the data reception complete state. If a data frame is received in an unexpected buffer state, a function code indicating a reception failure is sent back to the controller.
5. The non-periodic data transmission method for a heating network control system according to claim 4, characterized in that, The state of the data buffer also includes: The request to read state is entered after the non-periodic data request has been fully received and forwarded to the downstream device; And the response ready state, after receiving the non-periodic data reply from the downstream device and storing it in the buffer, enters the response ready state and triggers the change of the preset flag state.
6. The non-periodic data transmission method for a heating network control system according to claim 1, characterized in that, The master station sends one or more manually segmented data frames containing the aperiodic data response to the controller, including: When the length of the aperiodic data reply exceeds the data carrying capacity of a single frame, the master station encapsulates the aperiodic data reply into multiple data frames in segments. It also sets a function code in the header of each data frame to identify intermediate data frames during the aperiodic data reply transmission process or a function code to identify the end of transmission, and determines an incrementing frame sequence number so that the master station can reassemble the one or more segmented data frames.
7. The non-periodic data transmission method for a heating network control system according to claim 1, characterized in that, The method further includes: If the controller fails to detect a change in the state of the preset flag bit in the periodic data message within a preset monitoring period after sending the non-periodic data request to the master station, it determines that the non-periodic data transmission has failed.
8. A heating network control system, characterized in that, The system includes: The controller is configured to: send a non-periodic data request to the master station during a communication gap between periodic communication with the master station and periodic communication with another device; continuously monitor a preset flag bit in the periodic data packets replied by the master station; and, after detecting a change in the status of the flag bit, actively initiate a data read request to the master station during the communication gap to obtain a non-periodic data reply. The master station is configured to: receive and process non-periodic data requests from the controller; forward the requests to downstream devices; after receiving a non-periodic data response from a downstream device, change the state of the preset flag bit in the periodic data message sent to the controller; and respond to a data read request initiated by the controller by sending the non-periodic data response during the communication gap period.
9. The system according to claim 8, characterized in that, The controller is also configured to: When the length of a non-periodic data request to be sent exceeds the data carrying capacity of a single frame, the request is divided into multiple data segments, and a message header containing a function code and frame sequence number is added to each data segment so that multiple data frames can be sent in batches.
10. The system according to claim 8, characterized in that, The main site also includes: The data buffer is configured to: reassemble the data frames sent by the controller in batches according to the function code and frame sequence number in the received data frames, and control the reception, forwarding and reply process of non-periodic data by managing multiple internal states of the data buffer.