A communication node optimization method for a dual-redundant DCS control system

By setting up a data distributor in the dual-redundant DCS control system and adopting data classification and intelligent switching strategies, the problem of primary DPU crash is solved, active load sharing of the backup DPU and high system reliability are achieved, and data processing capabilities in industrial scenarios are improved.

CN120560209BActive Publication Date: 2025-10-17NANJING HORBON ENERGY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511053111.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-10-17
Estimated Expiration
2045-07-30

AI Technical Summary

Technical Problem

When faced with a surge in instantaneous data, the existing dual-redundant DCS control system is prone to the main DPU crashing and the backup DPU resources are not fully utilized, resulting in low system reliability and response efficiency.

Method used

By setting up a data distributor between the DPU and the IO adapter board, and adopting the triple operation of data classification-mapping table dynamic routing-intelligent master-slave switching, a three-level message processing order is established to ensure the priority processing of critical messages, reasonable diversion and buffering of messages, and implement intelligent switching strategies when the main DPU crashes.

Benefits of technology

It effectively prevents system avalanches caused by data surges, improves the utilization of standby DPUs, reduces the processing pressure of the main DPU, and ensures the high reliability and rapid recovery capabilities of the system in bursty data streams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120560209B_ABST
    Figure CN120560209B_ABST
Patent Text Reader

Abstract

The present disclosure provides a communication node optimization method, an electronic device and a storage medium for a dual-redundant DCS control system, the method comprising: obtaining a buffered message in communication data; maintaining a mapping table, the key of the mapping table being the data type of the buffered message, and the value being the distribution direction of the buffered message, dynamically routing the buffered message to a primary DPU or a backup DPU based on the mapping table; and when the primary DPU cannot respond to the message of the client, performing an intelligent primary-backup switching strategy. The method of the present disclosure realizes the conversion of the backup DPU from passive cold backup to active load sharing node through the triple operation of data classification-mapping table dynamic routing-intelligent primary-backup switching, maximizes the hardware utilization rate, significantly reduces the risk of system out of control through hierarchical prevention and rapid reorganization after collapse, improves the reliability, and has universality for industrial scenes that need to cope with sudden data flow.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of industrial automation control, and in particular to a communication node optimization method for a dual-redundancy DCS control system. BACKGROUND

[0002] A distributed control system (DCS) is a core infrastructure in the field of industrial automation, which includes key components such as distributed processing units (DPUs), communication buses, power modules, etc. Through the dual-redundancy design of the dual-machine master-slave architecture, high reliability control is achieved. In high-safety scenarios such as power and chemical industries, the dual-redundancy DCS system needs to ensure that the standby DPU can seamlessly take over the control right when the main DPU fails. In the prior art, dual-redundancy modes are mainly divided into two categories:

[0003] 1. Cold backup mode: the main DPU handles all data when there is no failure, and the standby DPU is completely idle. When the main DPU fails, the standby DPU switches to take over instantly, which has fast switching speed and simple configuration, but the hardware resources of the standby DPU are idle for a long time, and historical data needs to be reloaded when switching.

[0004] 2. Hot backup mode: the main and standby DPUs run in parallel and synchronize data in real time. The switching is smooth, but the continuous communication and data comparison of the dual machines need to be maintained, which has large synchronization overhead and increases the debugging complexity and fault positioning difficulty of the configuration.

[0005] Although the dual-redundancy mechanism improves system availability, the problem of main DPU crash caused by instantaneous data surge has not been effectively solved. For example, Figure 1 Figure 1 shows the architecture of a dual-redundancy DCS control system in the prior art, which uses a cold backup mode. The main DPU directly processes all data, and when a sudden traffic surge causes a crash, the standby DPU needs to be switched. How to reasonably use the resources of the standby DPU and avoid the main DPU crash caused by instantaneous data surge has become a problem to be solved. SUMMARY

[0006] Therefore, in order to solve the problems brought by the prior art, the present application provides a communication node optimization method for a dual-redundancy DCS control system.

[0007] In a first aspect, the present disclosure provides a communication node optimization method for a dual-redundancy DCS control system, applied to a data distributor, the data distributor being arranged between a DPU and an IO adapter board, and the method comprising:

[0008] S100, obtaining a buffered message in communication data;

[0009] S200, maintaining a mapping table, a key of the mapping table being a data type of a buffered message, a value of the mapping table being a distribution direction of the buffered message, dynamically routing the buffered message to the primary DPU or the standby DPU based on the mapping table;

[0010] S300, when the primary DPU is unable to respond to a message of a client, performing an intelligent primary-standby switching strategy.

[0011] Optionally, the step S100 specifically comprises:

[0012] The communication data is divided into three categories through a Golang channel mechanism:

[0013] The response message is triggered by a state change channel c.statusChange, and has the highest priority;

[0014] The timing message is triggered by a timer channel c.timing.C, and has a medium priority;

[0015] The buffered message is triggered by a time.After delay queue, and has the lowest priority.

[0016] Optionally, the step S200 specifically comprises:

[0017] If the data type of the buffered message is no logical coupling, the buffered message is sent to the standby DPU;

[0018] If the data type of the buffered message is logical coupling, the buffered message is sent to the primary DPU;

[0019] The mapping table is synchronized to all nodes in real time.

[0020] Optionally, the judging of the data type of the buffered message comprises:

[0021] The logical coupling of the buffered message is judged by analyzing function call relations and data flow paths in DPU source code, and the type of the buffered message is verified;

[0022] The logical coupling of the buffered message is judged by analyzing function call relations and data flow paths in DPU source code, and the type of the buffered message is verified;

[0023] If the buffered message is only called when the buffered message is obtained, the buffered message is stored in a database, and a response message is accepted, it is judged that the buffered message is a no logical coupling buffered message, otherwise, it is a logical coupling buffered message.

[0024] Optionally, the step S300 specifically comprises:

[0025] S301, the client sends a secondary response message to the standby DPU, the standby DPU verifies the integrity of the local data of the standby DPU, if the data is complete, the standby DPU directly responds to the request of the client; if the data is not complete, the first data request sent by the standby DPU is received;

[0026] S302, based on the first data request, the data amount distribution in the main DPU, the standby DPU and the local queue is counted, and according to the counting result, the unique response end is selected from the main DPU and the standby DPU to execute the secondary response message;

[0027] S303, the cross-node data aggregation is executed by the determined unique response end, and the data aggregation result is fed back to the client.

[0028] Optionally, the step S302 specifically comprises:

[0029] S3021, according to the first data request, the effective data amount d1 of the data required by the first data request in the main DPU, the data amount d2 of the data required by the secondary response message in the standby DPU which has been processed, and the data amount d3 of the data required by the first data request in the local queue are counted;

[0030] S3022, according to the length of the local queue, the unique response end is selected from the main DPU and the standby DPU to execute the secondary response message.

[0031] Optionally, the step S3022 specifically comprises:

[0032] When d1> p * (d2 + d3), the main DPU is specified as the unique response end;

[0033] When d1≤ p * (d2 + d3), the standby DPU is specified as the unique response end;

[0034] The p is a dynamic weight coefficient, which is adaptively adjusted according to the length of the local queue.

[0035] Optionally, the step S303 specifically comprises:

[0036] S3031, a second data request is sent to the non-unique response end, the data corresponding to the second data request is stored in the non-unique response end and is required for executing the secondary response message;

[0037] S3032, according to the second data request, the corresponding data is obtained, which is integrated with the data stored in the local queue and required for executing the secondary response message, and is sent to the unique response end;

[0038] S3033, the unique response end aggregates according to the data stored locally for performing the secondary response message required, and the integrated data obtained from the data distributor, and feeds back to the client.

[0039] In a second aspect, the present disclosure provides an electronic device, comprising a memory and at least one processor, the memory storing a computer program, and the processor being configured to execute the computer program to implement the communication node optimization method for a dual-redundancy DCS control system according to the first aspect.

[0040] In a third aspect, the present disclosure provides a computer storage medium storing a computer program, which, when executed, implements the communication node optimization method for a dual-redundancy DCS control system according to the first aspect.

[0041] The present disclosure has the following advantages compared with the prior art:

[0042] 1) By establishing a three-level message processing order, the data flow paradigm of the dual-redundancy DCS system is fundamentally restructured. The response message uses the state change channel c.statusChange to achieve the highest priority preemption, ensuring that the operation instruction and the safety alarm such as never block the critical resources; the timing message is maintained by the fixed interval trigger c.timing.C to maintain the basic control cycle, ensuring that the real-time core function is not disturbed; the buffer message depends on the time.After delay queue to activate in the system idle window, strictly limiting non-real-time tasks to fragmented resources for processing. This hierarchical architecture effectively prevents the system avalanche caused by the surge of regular data.

[0043] 2) Based on the mapping table mechanism, the buffer message without dependence is accurately shunted to the standby DPU, and the mapping table is synchronized to all nodes in real time to ensure that the data location is traceable. This mechanism completely restructures the value chain of the cold backup resource, and the standby DPU changes from a completely idle state to a "warm standby processor" that can share non-critical load, significantly reducing the processing pressure of the main DPU and relieving the collapse risk caused by the surge of data from the source.

[0044] 3) When the main DPU collapses due to data surge, efficient recovery is achieved through an intelligent master-slave switching strategy, forming a technical closed loop that completely eliminates the retry dead loop, so that the client can obtain a complete response within two requests, and completely solves the fatal defect of repeated retries caused by the return of empty data in the response message, leading to system paralysis.

[0045] In summary, the present disclosure provides a communication node optimization method for a dual-redundant DCS control system, which forms a "prevention-optimization-eradication" system through triple operations of data classification-mapping table dynamic routing-intelligent master-backup switching, realizes the conversion of the standby DPU from passive cold backup to active load sharing node, maximizes hardware utilization, significantly reduces the risk of system out-of-control through hierarchical prevention and rapid reorganization after collapse, and improves reliability, which is universal for industrial scenes that need to cope with sudden data flow. BRIEF DESCRIPTION OF DRAWINGS

[0046] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, further serve to explain the principles of the present disclosure.

[0047] Figure 1 A schematic diagram of a prior art dual-redundant DCS control system architecture is shown.

[0048] Figure 2 A schematic diagram of a dual-redundant DCS control system architecture provided by an embodiment of the present disclosure is shown.

[0049] Figure 3 A flowchart of a communication node optimization method for a dual-redundant DCS control system provided by an embodiment of the present disclosure is shown.

[0050] Figure 4 A communication schematic diagram of a dual-redundant DCS control system is shown.

[0051] Through the above-described drawings, the explicit embodiments of the present disclosure have been shown, and more detailed descriptions will be given hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present disclosure by any means, but to illustrate the concept of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0052] The present disclosure will be further described below with reference to the drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present disclosure, and cannot limit the protection scope of the present disclosure.

[0053] The components of the embodiments of the present disclosure generally described and illustrated in the accompanying drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed present disclosure, but only represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present disclosure.

[0054] Hereinafter, the terms "include", "have", and their conjugates, which can be used in various embodiments of the present application, are merely intended to denote a certain characteristic, number, step, operation, component, part, or combination thereof, and are not intended to exclude the presence or addition of one or more other characteristics, numbers, steps, operations, components, parts, or combinations thereof.

[0055] In addition, the terms "first", "second", and the like are used only to distinguish descriptions, and are not to be understood as indicating or implying relative importance.

[0056] Unless defined otherwise, all terms used herein (including technical terms and scientific terms) have the same meaning as those commonly understood by one of ordinary skill in the art to which various embodiments of the present application belong. Terms such as those defined in a generally used dictionary will be interpreted to have the same meaning as in the context of the relevant art and will not be interpreted to have an idealized or overly formal meaning unless clearly defined in various embodiments of the present application.

[0057] Figure 1 is a schematic diagram of a dual-redundant DCS control system architecture of the prior art, as shown in Figure 1 includes:

[0058] Client: connected to the switch through the network line, thereby integrating into the system network, realizing engineering configuration, operation control, etc. of the system;

[0059] Switch: connected to the main DPU and the standby DPU, respectively, for network data exchange, building a link for control core and signal switching;

[0060] DPU: the core operation engine of DCS, with main DPU and standby DPU dual-redundancy;

[0061] Storage module: provides data redundancy and real-time synchronization between the main DPU and the standby DPU, ensuring the reliability and continuity of the system;

[0062] IO switching board: for signal switching;

[0063] Branch: for wiring collection, electrical isolation, signal protection, etc., which is generally grouped according to logical areas for wiring, facilitating fault location and modification;

[0064] Field instruments: including various sensors, detection devices, etc., such as pressure transmitters, temperature sensors, etc. field detection devices, and cameras, etc. for collecting field operation parameters, which are connected to the branch (branch 1-branch N) through the line, the branch accesses the IO switching board, and then transmits the field data to the system.

[0065] To solve the problem of DPU collapse caused by the surge of instantaneous data in the prior art DCS control system, the present application improves the dual-redundancy DCS control system architecture in the prior art, as shown in Figure 2 . Figure 2 It is a schematic diagram of a dual-redundancy DCS control system architecture according to an embodiment of the present disclosure.

[0066] As shown in Figure 2 , the dual-redundancy DCS control system provided by the present embodiment adds a data distributor to the prior art, which is connected to the main DPU and the standby DPU, and the other end is connected to the IO adapter board for processing buffered data.

[0067] Based on the dual-redundancy DCS control system architecture shown in Figure 2 , the present embodiment provides a communication node optimization method for a dual-redundancy DCS control system, as shown in Figure 3 , the method is applied to a data distributor, which is arranged between the DPU and the IO adapter board.

[0068] A data distributor for processing buffered messages is arranged between the DPU and the IO adapter board, and its operating mechanism relies on the fine identification of data flow and resource coordination. When implemented, the hardware connection topology needs to be reconfigured first, and the original one-way channel of the DPU directly connected to the IO adapter board is adjusted to a bidirectional shunt architecture: the input end of the data distributor is connected to the communication interface of the main DPU and the standby DPU, and the output end is directly connected to the data receiving port of the IO adapter board, forming a triangular data path. When non-real-time data flow from the field instrument arrives, the built-in protocol analysis engine will classify it immediately according to the type identification field (such as a specific flag bit in the Modbus TCP function code) in the data packet header. For data packets identified as buffered messages, the system will import them into a priority queue staging area composed of memory blocks, and the depth parameter of this staging area needs to be dynamically adjusted according to the available capacity of the storage module.

[0069] Referring to Figure 4 , the method can include the following steps:

[0070] S100, obtaining buffered messages in communication data;

[0071] In some embodiments, we divide the communication data into response messages, timing messages, and buffer messages. Golang is a statically typed, compiled language with strong expression capabilities. Using golang to classify communication data, the core is to manage the three types of messages through the channel mechanism. First, define three key triggers, which correspond to the processing entry of the three types of messages. Response messages are triggered by the status change trigger c.statusChange, which has the highest priority. The channel receiving end listens through select, triggering the response message processing function f1(). Timing messages are triggered by the timing trigger c.timing.C, which has medium priority. The time event trigger function f2() is sent to the c.timing.C channel at a fixed interval of c.interval seconds to process real-time sensor data. Timing messages often have strong logical coupling between them. Buffer messages are triggered by the buffer trigger queue.C, which has the lowest priority. It is only activated when the system is idle, i.e. when there is no statusChange or timing.C event. The queue channel is triggered, triggering function f3(), which processes non-real-time data. Buffer messages are subject to the processing speed of timing messages and response messages and can be interrupted at any time by high-priority events. Therefore, buffer messages usually refer to messages with large data volume and low real-time requirements. By distinguishing the processing priority of communication data, we can avoid the paralysis of key functions when the DPU is under high load.

[0072] The implementation code is as follows:

[0073] c :=&Client{

[0074] C:make(chan interface{}, 3000),

[0075] / / Create a general channel with a buffer capacity of 3000 to receive all types of messages

[0076] statusChange: make(chan struct{}, 2),

[0077] / / Status change channel (unbuffered), highest priority, used to trigger immediate response messages

[0078] interval:1,

[0079] / / Timer interval (seconds), controls the processing frequency of timing messages

[0080] buffer:60,

[0081] / / Buffer message waiting time (seconds), determines the maximum delay of non-real-time messages

[0082] }

[0083] func (c *Client) Start() {

[0084] c.timing = time.NewTicker(time.Duration(c.interval) * time.Second)

[0085] / / Create a ticker with 1 second period

[0086] queue := time.After(time.Duration(c.buffer) * time.Second)

[0087] / / Create a buffered delay trigger with 60 seconds timeout

[0088] defer c.timing.Stop()

[0089] / / Stop the timer on function exit

[0090] defer queue.Stop()

[0091] / / Stop the buffered timer

[0092] for {

[0093] select {

[0094] case<-c.statusChange: / / Response message trigger

[0095] c.f1() / / Handle high priority task

[0096] case<-c.timing.C: / / Ticker message trigger (every 1 second)

[0097] c.f2() / / Handle periodic task

[0098] case<-queue.C: / / Buffered message trigger (60 seconds timeout or idle)

[0099] c.f3() / / Handle non-realtime batch data...

[0100] }

[0101] }

[0102] }

[0103] In the technical solution of the disclosed embodiment, by classifying communication data, the data flow paradigm of the dual-redundant DCS system is fundamentally reconstructed, a strict message processing priority order is established, and response messages implement interrupt responses through the statusChange channel to ensure that operation instructions and safety alarms are never blocked; timing messages are triggered by the timing.C cycle to maintain the basic control loop and achieve resource isolation optimization, and buffered messages utilize fragmented computing resources through the time.After idle time mechanism. When data surges, buffered messages automatically give way, ensuring immediate response to emergency instructions and preventing regular data surges.

[0104] S200, maintaining a mapping table, wherein the key of the mapping table is the data type of the buffered message, and the value is the distribution direction of the buffered message, and the buffered message is dynamically routed to the active DPU or the standby DPU based on the mapping table;

[0105] To further avoid data surge, in some embodiments, the data distributor generates a mapping table by parsing the DPU source code during the system initialization phase. This process identifies the type of buffered message through static code analysis. The types of buffered messages are divided into those with logical coupling and those without logical coupling. Those skilled in the art understand that the logical coupling of the buffered message refers to whether the buffered message depends on other communication data or system status during the DPU processing process. Specifically, if the buffered message needs to be combined with other data (such as real-time sensor readings, historical analysis results) to generate a valid output, then there is logical coupling. For example, the vibration spectrum data of the turbine needs to be calculated together with the bearing temperature data to determine the risk of mechanical failure. If the buffered message can be stored, called or responded to independently without cross-data interaction, it is considered that there is no logical coupling. For example, the maintenance log only needs to be archived to the database by timestamp, or respond to independent query requests.

[0106] The method for determining the type of the buffered message includes: determining the logical coupling of the buffered message by parsing the function call relationship and data flow path in the DPU source code, and verifying the type of the buffered message.

[0107] In one embodiment, the determining of the logical coupling of the buffered messages by parsing the function call relationship and data flow path in the DPU source code includes:

[0108] When the buffered message is called only when obtaining the buffered message, storing the buffered message in the database, and receiving the response message, the buffered message is determined to be a buffered message without logical coupling, otherwise it is a buffered message with logical coupling.

[0109] In an embodiment, the verifying the type of the buffered message comprises: injecting a buffered data stream in a system test phase, isolating a target data type (such as shielding a temperature sensor), observing whether the buffered message processing result is abnormal, if the output result is still valid, confirming that there is no logical coupling, such as independently generating a log file; if the output is invalid, there is logical coupling, such as a fault diagnosis function reporting an error due to the lack of temperature data.

[0110] According to the logical coupling of the buffered message, the key of the mapping table is generated, which comprises: extracting the parameter type of the buffered message processing function in the source code, and mapping it as the type identifier of the buffered message. The assignment rule of the value in the mapping table comprises: if the data type of the buffered message is not logically coupled, the distribution direction is marked as 1, that is, sent to the standby DPU; if the data type of the buffered message is logically coupled, the distribution direction is marked as 0, that is, sent to the main DPU.

[0111] Further, the mapping table is synchronized in real time to all nodes to ensure that the data location is traceable.

[0112] In the technical solution of the embodiments of the present disclosure, the communication data classification mechanism and the dynamic routing of the mapping table constitute two core defense lines. The data classification establishes a three-level message processing order to fundamentally prevent the system avalanche caused by the surge of conventional data. Based on the static analysis of the DPU source code, the logical coupling of the buffered message is accurately identified and shunted to the standby DPU for processing, which significantly reduces the peak load of the main DPU.

[0113] However, these two technologies are still insufficient in the extreme scenario of sudden collapse of the main DPU. Specifically, when the main DPU collapses due to instantaneous overload, the data stored in the mapping table is fragmented, and the response data requested by the client often needs to be aggregated across sources (for example, vibration spectrum needs to be combined with temperature record data). At this time, the buffered message is not processed in time and is forced to return a response of "incomplete data". This scenario can cause the client to repeatedly retry the request, thereby squeezing the residual resources of the system, and a vicious cycle of completely paralyzing the response channel occurs. To further avoid this defect, a dynamic data aggregation engine is needed to select the optimal recovery path after the main DPU collapses.

[0114] S300, when the main DPU cannot respond to the message of the client, an intelligent primary-backup switching strategy is executed.

[0115] In an optional embodiment, when the client sends a response message to the main DPU, if the main DPU collapses due to data surge or is overloaded and cannot respond, the system detects a timeout or returns empty data, and then triggers the process start condition of the intelligent primary-backup switching strategy, and provides a basis for subsequent switching to the standby node by identifying the failure state of the main DPU.

[0116] The step S300 includes:

[0117] S301: The client sends a secondary response message to the standby DPU. The standby DPU verifies the integrity of the standby DPU's local data. If the data is complete, the standby DPU directly responds to the client's request. If the data is incomplete, the standby DPU receives the first data request sent by the standby DPU.

[0118] In an optional embodiment, when the main DPU is unable to respond to the client's message, the client automatically turns to the backup DPU to send the same request. For example, when the response message requests a vibration spectrum report for a certain period of time, the backup DPU searches to see if it has processed all the buffered messages required for the request. If the vibration spectrum data has been routed to the backup DPU through the mapping table, the backup DPU directly returns the vibration spectrum report requested by the client to the client; if the vibration spectrum data needs to be associated with other data of the main DPU or the data distributor to be obtained, the backup DPU sends a first data request to the data distributor, and the first data request includes the data required for the secondary response message and the corresponding timestamp.

[0119] S302: Counting the data volume distribution in the primary and backup DPUs and the local queue based on the first data request, and selecting a unique responder from the primary and backup DPUs to execute the secondary response message according to the statistical result;

[0120] The step S302 includes:

[0121] S3021: Based on the first data request, count the amount of valid data d1 in the primary DPU, including the data required by the first data request, the amount of data d2 processed by the backup DPU, and the amount of data required by the second response message in the local queue.

[0122] S3022: Select a unique responder from the active and standby DPUs according to the length of the local queue to execute the secondary response message.

[0123] In an optional embodiment, to execute the secondary response message, the amount of data received by the primary DPU is d1, the amount of data received by the backup DPU is d2, and the amount of data in the data distributor is d3. The data distributor selects a unique responder from the primary and backup DPUs by comparing d1 with p * (d2 + d3):

[0124] When d1> p * (d2 + d3), the master DPU is designated as the only responder;

[0125] When d1≤ p * (d2 + d3), the standby DPU is designated as the only responder;

[0126] The p is a dynamic weight coefficient, which can be adaptively adjusted according to the length of the queue in the data distributor. Optionally, the longer the queue, the greater the value of p, that is, the greater the data amount, and the more inclined to use the standby DPU. By selecting the DPU with lower aggregation cost through the data distribution ratio, cross-node repeated processing is avoided.

[0127] S303, performing cross-node data aggregation by the determined unique response end, and feeding back the data aggregation result to the client.

[0128] The step S303 comprises:

[0129] S3031, sending a second data request to the non-unique response end, wherein the data corresponding to the second data request is the data stored in the non-unique response end and required for executing the secondary response message;

[0130] S3032, obtaining the corresponding data according to the second data request, integrating the data with the data stored in the local queue and required for executing the secondary response message, and sending the integrated data to the unique response end;

[0131] S3033, the unique response end aggregates the data stored locally and required for executing the secondary response message and the integrated data obtained from the data distributor, and feeds back to the client.

[0132] In an optional embodiment, when the primary DPU is the unique response end, the data distributor sends a second data request to the standby DPU, requiring the standby DPU to feed back the data amount d2 to the data distributor. After the data distributor receives the data amount d2, the data distributor integrates the data amounts d2 and d3, aligns them according to the time stamp, and then sends them to the unique response end primary DPU, so as to ensure that the secondary response message can obtain complete data. Finally, the primary DPU integrates all the data (i.e., including the local data d1+ the forwarded data d2 and d3), generates a complete response (such as a spectrum analysis report), and returns it to the client. Conversely, when the standby DPU is the unique response end, the data distributor sends a second data request to the primary DPU, requiring the primary DPU to feed back the data amount d1 to the data distributor. After the data distributor receives the data amount d1, the data distributor integrates the data amounts d1 and d3, aligns them according to the time stamp, and then sends them to the unique response end standby DPU, so as to ensure that the secondary response message can obtain complete data. Finally, the standby DPU integrates all the data (i.e., including the local data d2+ the forwarded data d1 and d3), generates a complete response, and returns it to the client.

[0133] The intelligent master-backup switching strategy eliminates the conflict risk of parallel processing of the master DPU and the backup DPU through the setting of the unique response end, selects the optimal aggregation path through quantitative data distribution decision, avoids the vicious circle caused by repeated retries of the client, and uses the data distributor as a data exchange hub to avoid the delay of the traditional cold backup switching of the historical data under heavy load.

[0134] In conclusion, the application fundamentally reconstructs the data flow paradigm of the dual-redundancy DCS system by establishing a three-level message processing order. The response message uses the state change channel c.statusChange to achieve the highest priority preemption, ensuring that the operation instruction and safety alarm never block the critical resources. The timing message maintains the basic control cycle through the fixed interval trigger c.timing.C, ensuring that the real-time core function is not disturbed. The buffer message relies on the time.After delay queue to activate in the system idle window, strictly limiting non-real-time tasks to fragmented resources for processing. This hierarchical architecture effectively prevents system avalanches caused by a surge in regular data. The application also accurately shunts the buffer message without dependency to the backup DPU based on the mapping table mechanism, and synchronizes the mapping table to all nodes in real time to ensure that the data location is traceable. This mechanism completely reconstructs the value chain of the cold backup resource, transforming the backup DPU from a completely idle state to a "warm backup processor" that can share non-critical loads, significantly reducing the processing pressure on the master DPU and mitigating the risk of collapse caused by a surge in data from the source. When the master DPU collapses due to a surge in data, the intelligent master-backup switching strategy enables efficient recovery, forming a technical closed loop that eliminates the retry dead loop, ensuring that the client can obtain a complete response within two requests, and completely solving the fatal flaw of repeated retries triggered by the return of empty data in response messages, leading to system paralysis. Through the three operations of data classification-mapping table dynamic routing-intelligent master-backup switching, the application forms a "prevention-optimization-eradication" system, transforming the backup DPU from a passive cold backup to an active load sharing node, maximizing hardware utilization, significantly reducing the risk of system out of control through hierarchical prevention and rapid reorganization after collapse, and improving reliability. The application has universality for industrial scenarios that need to cope with sudden data flow.

[0135] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which can include a processor, a communications interface, a memory, and a communications bus, wherein the processor, the communications interface, and the memory complete mutual communication through the communications bus. The processor can invoke a logical instruction in the memory to execute the communication node optimization method for the dual-redundancy DCS control system provided by each method.

[0136] In addition, the logic instructions in the above-mentioned memory can be realized in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present disclosure essentially or in other words the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0137] In another aspect, the present disclosure also provides a non-transitory computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements a method for optimizing a communication node of a dual-redundancy DCS control system as described above.

[0138] The device embodiments described above are only schematic, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.

[0139] From the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software plus a necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions essentially or in other words the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0140] It should be understood that the above examples are only used to illustrate the technical solutions of the present disclosure, but not limit the same; although the present disclosure has been described in detail with reference to the foregoing examples, it should be understood by those of ordinary skill in the art that the technical solutions recorded in the foregoing examples can be modified, or some technical features thereof can be replaced by equivalent replacements; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A communication node optimization method for a dual-redundant DCS control system, applied to a data distributor, characterized in that: The data distributor is arranged between the DPU and the IO adapter board, and the method includes: S100, obtaining a buffered message in the communication data; S200, maintaining a mapping table, wherein the key of the mapping table is the data type of the buffered message, and the value is the distribution direction of the buffered message, and the buffered message is dynamically routed to the active DPU or the standby DPU based on the mapping table; Determining a data type of the buffered message, and if the data type of the buffered message indicates that there is no logical coupling, sending the buffered message to a standby DPU; Determining the data type of the buffered message includes: By parsing the function call relationship and data flow path in the DPU source code, the logical coupling of the buffered message is determined and the type of the buffered message is verified; The method of determining the logical coupling of buffered messages by parsing the function call relationship and data flow path in the DPU source code includes: If the buffered message is called only when obtaining the buffered message, storing the buffered message in the database, and receiving the response message, the buffered message is determined to be a buffered message without logical coupling; otherwise, it is a buffered message with logical coupling. If the data type of the buffered message is logical coupling, the buffered message is sent to the master DPU; Synchronize the mapping table to all nodes in real time; S300: When the active DPU cannot respond to the client's message, an intelligent active / standby switching strategy is executed.

2. A communication node optimization method for a dual-redundant DCS control system according to claim 1, characterized in that: The step S100 includes: Communication data is divided into three categories through the Golang channel mechanism: The response message is triggered by the status change channel c.statusChange and has the highest priority; Timing messages are triggered by the timer channel c.timing.C and have a medium priority. The buffered message is triggered by the delay queue time.After and has the lowest priority.

3. The communication node optimization method for a dual-redundant DCS control system according to claim 1, characterized in that: The step S300 includes: S301: The client sends a secondary response message to the standby DPU. The standby DPU verifies the integrity of the standby DPU's local data. If the data is complete, the standby DPU directly responds to the client's request. If the data is incomplete, the standby DPU receives the first data request sent by the standby DPU. S302: Counting the data volume distribution in the primary and backup DPUs and the local queue based on the first data request, and selecting a unique responder from the primary and backup DPUs to execute the secondary response message according to the statistical result; S303: The determined unique responder performs cross-node data aggregation and feeds back the data aggregation result to the client.

4. A communication node optimization method for a dual-redundant DCS control system according to claim 3, characterized in that: The step S302 includes: S3021: Based on the first data request, count the amount of valid data d1 in the primary DPU, including the data required by the first data request, the amount of data d2 processed by the backup DPU, and the amount of data required by the second response message in the local queue. S3022: Select a unique responder from the active and standby DPUs according to the length of the local queue to execute the secondary response message.

5. The communication node optimization method for a dual-redundant DCS control system according to claim 4, characterized in that: The step S3022 includes: When d1>p*(d2+d3), the master DPU is designated as the only responder; When d1≤p*(d2+d3), the standby DPU is designated as the only responder; The p is a dynamic weight coefficient, which is adaptively adjusted according to the length of the local queue.

6. A communication node optimization method for a dual-redundant DCS control system according to claim 5, characterized in that: The step S303 includes: S3031: Send a second data request to the non-unique responding end, where the data corresponding to the second data request is data stored in the non-unique responding end and required for executing the secondary response message; S3032: Acquire corresponding data according to the second data request, integrate the corresponding data with the data stored in the local queue and required for executing the second response message, and send the data to the unique responder; S3033, the unique responder performs aggregation processing based on the data stored locally and required for executing the secondary response message, and the integrated data obtained from the data distributor, and feeds back to the client.

7. An electronic device, characterized in that: The electronic device includes a memory and at least one processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the communication node optimization method for a dual-redundant DCS control system according to any one of claims 1 to 6.

8. A computer storage medium, characterized in that The device stores a computer program, which, when executed, implements the communication node optimization method for a dual-redundant DCS control system according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Distributed service intelligent master selection method and system based on double-engine cooperation

    CN119484230A